summaryrefslogtreecommitdiffstats
path: root/include/qom
diff options
context:
space:
mode:
authorMarc-André Lureau2019-11-08 15:02:25 +0100
committerMarc-André Lureau2020-01-02 10:54:57 +0100
commitf60a1cdca52dd9cf49aad768471d9e0ea6751f76 (patch)
tree2fa3cacbc43ff528e2007e2c0e6c2db190ac6483 /include/qom
parentui: add pixman image g_autoptr support (diff)
downloadqemu-f60a1cdca52dd9cf49aad768471d9e0ea6751f76.tar.gz
qemu-f60a1cdca52dd9cf49aad768471d9e0ea6751f76.tar.xz
qemu-f60a1cdca52dd9cf49aad768471d9e0ea6751f76.zip
object: add g_autoptr support
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'include/qom')
-rw-r--r--include/qom/object.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/qom/object.h b/include/qom/object.h
index 1d7b7e5a79..54a548868c 100644
--- a/include/qom/object.h
+++ b/include/qom/object.h
@@ -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