diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2007-11-22 10:16:05 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2007-11-22 10:16:05 +0000 |
commit | 44099876fa90b412def65571c0f6d326f0995209 (patch) | |
tree | 6038e5f9c3f55a2defc345662536aca1c6e986a3 /tools | |
parent | b23e318f6a2fb0d4c6c65607da1b21d3e8b277c1 (diff) | |
download | telepathy-glib-44099876fa90b412def65571c0f6d326f0995209.tar.gz |
glib-client-gen: return const TpProxyPendingCall and TpProxySignalConnection so the user is reminded not to free them
20071122101605-53eee-a0e074a7aa3cdd6ace2b8189e6325240e5276b27.gz
Diffstat (limited to 'tools')
-rw-r--r-- | tools/glib-client-gen.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tools/glib-client-gen.py b/tools/glib-client-gen.py index 7f2adb5a4..d30d42081 100644 --- a/tools/glib-client-gen.py +++ b/tools/glib-client-gen.py @@ -126,7 +126,7 @@ class Generator(object): # Example: # - # TpProxySignalConnection * + # const TpProxySignalConnection * # tp_cli_connection_connect_to_new_channel # (TpProxy *proxy, # tp_cli_connection_signal_callback_new_channel callback, @@ -152,13 +152,14 @@ class Generator(object): self.b(' * Returns: a #TpProxySignalConnection containing all of the') self.b(' * above, which can be used to disconnect the signal') self.b(' */') - self.h('TpProxySignalConnection *%s_%s_connect_to_%s (gpointer proxy,' + self.h('const TpProxySignalConnection *%s_%s_connect_to_%s (' + 'gpointer proxy,' % (self.prefix_lc, iface_lc, member_lc)) self.h(' %s callback,' % callback_name) self.h(' gpointer user_data,') self.h(' GDestroyNotify destroy);') - self.b('TpProxySignalConnection *') + self.b('const TpProxySignalConnection *') self.b('%s_%s_connect_to_%s (gpointer proxy,' % (self.prefix_lc, iface_lc, member_lc)) self.b(' %s callback,' % callback_name) @@ -431,7 +432,8 @@ class Generator(object): # Async stub # Example: - # TpProxyPendingCall *tp_cli_properties_interface_call_get_properties + # const TpProxyPendingCall * + # tp_cli_properties_interface_call_get_properties # (gpointer proxy, # gint timeout_ms, # const GArray *in_properties, @@ -439,7 +441,7 @@ class Generator(object): # gpointer user_data, # GDestroyNotify *destructor); - self.h('TpProxyPendingCall *%s_%s_call_%s (gpointer proxy,' + self.h('const TpProxyPendingCall *%s_%s_call_%s (gpointer proxy,' % (self.prefix_lc, iface_lc, member_lc)) self.h(' gint timeout_ms,') @@ -469,7 +471,7 @@ class Generator(object): self.b(' * invalid when the callback is called, the call is') self.b(' * cancelled or the #TpProxy becomes invalid.') self.b(' */') - self.b('TpProxyPendingCall *\n%s_%s_call_%s (gpointer proxy,' + self.b('const TpProxyPendingCall *\n%s_%s_call_%s (gpointer proxy,' % (self.prefix_lc, iface_lc, member_lc)) self.b(' gint timeout_ms,') |