discomfitor pushed a commit to branch efl-1.9. http://git.enlightenment.org/core/efl.git/commit/?id=ee1af1e17719b9f4e19cce199d72eaa5d5394ae3
commit ee1af1e17719b9f4e19cce199d72eaa5d5394ae3 Author: Mike Blumenkrantz <[email protected]> Date: Sun May 4 20:36:58 2014 -0400 eldbus-codegen no longer passes garbage values to error callbacks @fix --- src/bin/eldbus/source_client.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/bin/eldbus/source_client.c b/src/bin/eldbus/source_client.c index d21bc77..af21c29 100644 --- a/src/bin/eldbus/source_client.c +++ b/src/bin/eldbus/source_client.c @@ -8,6 +8,14 @@ static const char *code_prefix = NULL; static char buffer[4028]; static const char * +null_or_zero(const char *type) +{ + if (type[0] == 's' || type[0] == 'o' || type[0] == 'v' || type[1]) + return "NULL"; + return "0"; +} + +static const char * prefix_append(const char *text) { if (code_prefix) @@ -252,7 +260,7 @@ source_client_simple_method_callback_generate(const DBus_Method *method, Eina_St continue; eina_strbuf_append(full_signature, arg->type); eina_strbuf_append_printf(h, ", %s%s", dbus_type2c_type(arg->type), arg->c_name); - eina_strbuf_append_printf(c_code, " %s%s;\n", dbus_type2c_type(arg->type), arg->c_name); + eina_strbuf_append_printf(c_code, " %s%s = %s;\n", dbus_type2c_type(arg->type), arg->c_name, null_or_zero(arg->type)); eina_strbuf_append_printf(end_cb, ", %s", arg->c_name); eina_strbuf_append_printf(arguments_get, ", &%s", arg->c_name); } @@ -416,14 +424,6 @@ prop_cb_get(const DBus_Property *prop) } } -static const char * -null_or_zero(const char *type) -{ - if (type[0] == 's' || type[0] == 'o' || type[0] == 'v' || type[1]) - return "NULL"; - return "0"; -} - static void source_client_property_generate_get(const DBus_Property *prop, Eina_Strbuf *c_code, Eina_Strbuf *h) { --
