mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-29 13:23:31 +02:00
gdbus-codegen: add autocleanup for FooObject
This is only enabled with `--c-generate-autocleanup all` for the reasons discussed on https://bugzilla.gnome.org/show_bug.cgi?id=763379.
This commit is contained in:
committed by
Philip Withnall
parent
5b78c3fdff
commit
745422afac
@@ -433,6 +433,11 @@ class HeaderCodeGenerator:
|
||||
self.outfile.write('GType %sobject_get_type (void) G_GNUC_CONST;\n'
|
||||
'\n'
|
||||
%(self.ns_lower))
|
||||
if self.generate_autocleanup == 'all':
|
||||
self.outfile.write('#if GLIB_CHECK_VERSION(2, 44, 0)\n')
|
||||
self.outfile.write('G_DEFINE_AUTOPTR_CLEANUP_FUNC (%sObject, g_object_unref)\n' % (self.namespace))
|
||||
self.outfile.write('#endif\n')
|
||||
self.outfile.write('\n')
|
||||
for i in self.ifaces:
|
||||
if i.deprecated:
|
||||
self.outfile.write('G_GNUC_DEPRECATED ')
|
||||
|
Reference in New Issue
Block a user