]> git.proxmox.com Git - mirror_qemu.git/commitdiff
object: add g_autoptr support
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Fri, 8 Nov 2019 14:02:25 +0000 (18:02 +0400)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 2 Jan 2020 09:54:57 +0000 (13:54 +0400)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
include/qom/object.h

index 1d7b7e5a794bb5337e977b55bc30dc51e44e2246..54a548868c396e3deb8a99143e7e75d40c81e356 100644 (file)
@@ -1766,4 +1766,7 @@ Object *container_get(Object *root, const char *path);
  * Returns the instance_size of the given @typename.
  */
 size_t object_type_get_instance_size(const char *typename);
+
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(Object, object_unref)
+
 #endif