From 006ca09f3027d86346fce707e9295975c6558f42 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 26 Jun 2017 13:52:24 +0200 Subject: qapi: Separate type QNull from QObject Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Daniel P. Berrange --- include/qapi/qmp/qobject.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'include/qapi') 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_; } -- cgit v1.2.3-55-g7522