mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-17 21:26:13 -07:00
include/qapi: add g_autoptr support for qobject types
Need wrappers for qobject_unref() calls, which is a macro. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220323155743.1585078-10-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
7773e13fa7
commit
d709bbf3b1
12 changed files with 54 additions and 0 deletions
|
|
@ -26,4 +26,8 @@ static inline QNull *qnull(void)
|
|||
return qobject_ref(&qnull_);
|
||||
}
|
||||
|
||||
void qnull_unref(QNull *q);
|
||||
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(QNull, qnull_unref)
|
||||
|
||||
#endif /* QNULL_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue