From: Marc-André Lureau Date: Fri, 8 Nov 2019 14:02:25 +0000 (+0400) Subject: object: add g_autoptr support X-Git-Tag: v5.0.0-rc0~164^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f60a1cdca52dd9cf49aad768471d9e0ea6751f76;p=thirdparty%2Fqemu.git object: add g_autoptr support Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- diff --git a/include/qom/object.h b/include/qom/object.h index 1d7b7e5a794..54a548868c3 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