summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2017-06-26 13:52:24 +0200
committerMarkus Armbruster <armbru@redhat.com>2017-07-24 13:35:11 +0200
commit006ca09f3027d86346fce707e9295975c6558f42 (patch)
tree1c06825264666d09ea76e3e4e2673fc089027b65 /include
parentdf95f1a298a3e16c80293343143dcedbe7978f6c (diff)
downloadqemu-006ca09f3027d86346fce707e9295975c6558f42.tar.gz
qapi: Separate type QNull from QObject
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/qapi/qmp/qobject.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/qapi/qmp/qobject.h b/include/qapi/qmp/qobject.h
index b8ddbca405..3543b552f4 100644
--- a/include/qapi/qmp/qobject.h
+++ b/include/qapi/qmp/qobject.h
@@ -93,11 +93,15 @@ static inline QType qobject_type(const QObject *obj)
return obj->type;
}
-extern QObject qnull_;
+typedef struct QNull {
+ QObject base;
+} QNull;
-static inline QObject *qnull(void)
+extern QNull qnull_;
+
+static inline QNull *qnull(void)
{
- qobject_incref(&qnull_);
+ QINCREF(&qnull_);
return &qnull_;
}