From f60a1cdca52dd9cf49aad768471d9e0ea6751f76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Fri, 8 Nov 2019 18:02:25 +0400 Subject: [PATCH] object: add g_autoptr support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- include/qom/object.h | 3 +++ 1 file changed, 3 insertions(+) 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