[vala] D-Bus: Fix output array parameters in servers
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [vala] D-Bus: Fix output array parameters in servers
- Date: Fri, 29 Jan 2010 17:48:48 +0000 (UTC)
commit a08f29f458abe4dfc90222cd32b2a2be043d92cd
Author: Jürg Billeter <j bitron ch>
Date: Fri Jan 29 18:47:52 2010 +0100
D-Bus: Fix output array parameters in servers
codegen/valadbusservermodule.vala | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/codegen/valadbusservermodule.vala b/codegen/valadbusservermodule.vala
index a3f4d03..64de305 100644
--- a/codegen/valadbusservermodule.vala
+++ b/codegen/valadbusservermodule.vala
@@ -228,12 +228,17 @@ internal class Vala.DBusServerModule : DBusClientModule {
cdecl = new CCodeDeclaration ("int");
cdecl.add_declarator (new CCodeVariableDeclarator (length_cname, new CCodeConstant ("0")));
- if (param.direction != ParameterDirection.IN) {
- out_prefragment.append (cdecl);
- ccall.add_argument (new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, new CCodeIdentifier (length_cname)));
+ if (!m.coroutine || param.direction == ParameterDirection.IN) {
+ if (param.direction != ParameterDirection.IN) {
+ out_prefragment.append (cdecl);
+ ccall.add_argument (new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, new CCodeIdentifier (length_cname)));
+ } else {
+ in_prefragment.append (cdecl);
+ ccall.add_argument (new CCodeIdentifier (length_cname));
+ }
} else {
- in_prefragment.append (cdecl);
- ccall.add_argument (new CCodeIdentifier (length_cname));
+ out_prefragment.append (cdecl);
+ finish_ccall.add_argument (new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, new CCodeIdentifier (length_cname)));
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]