Commit cbbcaa4d authored by Simon McVittie's avatar Simon McVittie

codegen: Add g_autoptr support for the shared GInterface

The rest of the generated classes gained g_autoptr support in fd6ca66c,
but this one is still missing. Because whatever_proxy_new_finish() and
whatever_proxy_new_sync() are declared as returning a Whatever *
instead of a WhateverProxy *, and the generated method-call stubs
act on a Whatever *, it's reasonably common to want to declare a
g_autoptr (Whatever).
Signed-off-by: Simon McVittie's avatarSimon McVittie <>
Bug: Colin Walters's avatarColin Walters <>
parent d95030a2
......@@ -307,6 +307,10 @@ class CodeGenerator:
self.h.write('#if GLIB_CHECK_VERSION(2, 44, 0)\n')
self.h.write('G_DEFINE_AUTOPTR_CLEANUP_FUNC (%s, g_object_unref)\n' % (i.camel_name))
self.h.write('GType %s_get_type (void) G_GNUC_CONST;\n'%(i.name_lower))
self.h.write('GDBusInterfaceInfo *%s_interface_info (void);\n'%(i.name_lower))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment