diff --git a/zbus_macros/src/proxy.rs b/zbus_macros/src/proxy.rs index e832039cf..db99cd5e1 100644 --- a/zbus_macros/src/proxy.rs +++ b/zbus_macros/src/proxy.rs @@ -559,7 +559,7 @@ fn gen_proxy_method_call( let object_path: #zbus::zvariant::OwnedObjectPath = self.0.call( #method_name, - &(#(#args),*), + &#zbus::zvariant::SerializeTuple((#(#args,)*)), ) #wait?; #proxy_path::builder(&self.0.connection()) @@ -574,11 +574,11 @@ fn gen_proxy_method_call( // the '()' from the signature that we add and not the actual intended ones. let arg = &args[0]; quote! { - &(#arg,) + &#zbus::zvariant::SerializeTuple((#arg,)) } } else { quote! { - &(#(#args),*) + &#zbus::zvariant::SerializeTuple((#(#args),*)) } }; diff --git a/zbus_macros/tests/tests.rs b/zbus_macros/tests/tests.rs index 7032c70b3..47862b8be 100644 --- a/zbus_macros/tests/tests.rs +++ b/zbus_macros/tests/tests.rs @@ -19,7 +19,10 @@ mod param { } mod test { - use zbus::fdo; + use zbus::{ + fdo, + zvariant::{OwnedStructure, Structure}, + }; #[zbus_macros::dbus_proxy( assume_defaults = false, @@ -34,6 +37,12 @@ mod test { /// which is useful to pass in a proxy as a param. It serializes it as an `ObjectPath`. fn some_method(&self, object_path: &T) -> zbus::Result<()>; + /// A call accepting an argument that does only implements DynamicType and Serialize. + fn test_dyn_type(&self, arg: Structure<'_>) -> zbus::Result<()>; + + /// A call returning an type that only implements DynamicDeserialize + fn test_dyn_ret(&self) -> zbus::Result; + #[dbus_proxy(name = "CheckRENAMING")] fn check_renaming(&self) -> zbus::Result>;