diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2013-01-03 12:33:09 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2013-01-03 13:56:16 +0000 |
commit | f4634b2caf1f92f27a507207ff181d3a7927871f (patch) | |
tree | 2d1567d69145244ad97cd76cc83d550184bbc63a /tools/glib-client-marshaller-gen.py | |
parent | 8058faf2407867dcda1aca35616dd23496b1b814 (diff) | |
download | telepathy-glib-f4634b2caf1f92f27a507207ff181d3a7927871f.tar.gz |
Make the code generation tools work under either Python 2 or 3
They have been verified to produce identical output in _gen.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=56758
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Xavier Claessens <xavier.claessens@collabora.co.uk>
Diffstat (limited to 'tools/glib-client-marshaller-gen.py')
-rw-r--r-- | tools/glib-client-marshaller-gen.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tools/glib-client-marshaller-gen.py b/tools/glib-client-marshaller-gen.py index cb27d638a..cd9823bdf 100644 --- a/tools/glib-client-marshaller-gen.py +++ b/tools/glib-client-marshaller-gen.py @@ -31,23 +31,23 @@ class Generator(object): for signal in signals: self.do_signal(signal) - print 'void' - print '%s_register_dbus_glib_marshallers (void)' % self.prefix - print '{' + print('void') + print('%s_register_dbus_glib_marshallers (void)' % self.prefix) + print('{') - all = self.marshallers.keys() + all = list(self.marshallers.keys()) all.sort() for marshaller in all: rhs = self.marshallers[marshaller] - print ' dbus_g_object_register_marshaller (' - print ' g_cclosure_marshal_generic,' - print ' G_TYPE_NONE, /* return */' + print(' dbus_g_object_register_marshaller (') + print(' g_cclosure_marshal_generic,') + print(' G_TYPE_NONE, /* return */') for type in rhs: - print ' G_TYPE_%s,' % type.replace('VOID', 'NONE') - print ' G_TYPE_INVALID);' + print(' G_TYPE_%s,' % type.replace('VOID', 'NONE')) + print(' G_TYPE_INVALID);') - print '}' + print('}') def types_to_gtypes(types): |