summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2009-09-28 19:38:27 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2010-03-30 20:30:25 +0100
commitd0c9a2744cf25511712bdcf7edf083cfce9b8029 (patch)
tree03d3f8c812630eb732ab65c3dd2a5a7bbf5e3e6b /tools
parent4cb6a1abc3f886c006a07583b4ec1bfb82def68d (diff)
Deprecate things in generated code with _TP_GNUC_DEPRECATED rather than G_GNUC_DEPRECATED
Diffstat (limited to 'tools')
-rw-r--r--tools/glib-client-gen.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/glib-client-gen.py b/tools/glib-client-gen.py
index 938a6faff..5263672e3 100644
--- a/tools/glib-client-gen.py
+++ b/tools/glib-client-gen.py
@@ -58,6 +58,8 @@ class Generator(object):
self.generate_reentrant = ('--generate-reentrant' in opts or
'--deprecate-reentrant' in opts)
self.deprecate_reentrant = opts.get('--deprecate-reentrant', None)
+ self.deprecation_attribute = opts.get('--deprecation-attribute',
+ 'G_GNUC_DEPRECATED')
def h(self, s):
if isinstance(s, unicode):
@@ -987,7 +989,7 @@ class Generator(object):
self.h(' GError **error,')
if self.deprecate_reentrant:
- self.h(' GMainLoop **loop) G_GNUC_DEPRECATED;')
+ self.h(' GMainLoop **loop) %s;' % self.deprecation_attribute)
self.h('#endif /* not %s */' % self.deprecate_reentrant)
else:
self.h(' GMainLoop **loop);')
@@ -1193,7 +1195,8 @@ if __name__ == '__main__':
options, argv = gnu_getopt(sys.argv[1:], '',
['group=', 'subclass=', 'subclass-assert=',
'iface-quark-prefix=', 'tp-proxy-api=',
- 'generate-reentrant', 'deprecate-reentrant='])
+ 'generate-reentrant', 'deprecate-reentrant=',
+ 'deprecation-attribute='])
opts = {}