From d709bbf3b17f43c91e82c3807a39f2c349d27934 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Wed, 23 Mar 2022 19:57:20 +0400 Subject: include/qapi: add g_autoptr support for qobject types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Need wrappers for qobject_unref() calls, which is a macro. Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster Reviewed-by: Richard Henderson Message-Id: <20220323155743.1585078-10-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini --- include/qapi/qmp/qbool.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/qapi/qmp/qbool.h') diff --git a/include/qapi/qmp/qbool.h b/include/qapi/qmp/qbool.h index 2f888d1..0d09726 100644 --- a/include/qapi/qmp/qbool.h +++ b/include/qapi/qmp/qbool.h @@ -21,6 +21,10 @@ struct QBool { bool value; }; +void qbool_unref(QBool *q); + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(QBool, qbool_unref) + QBool *qbool_from_bool(bool value); bool qbool_get_bool(const QBool *qb); -- cgit v1.1