diff options
Diffstat (limited to 'include/qapi/qmp/qobject.h')
-rw-r--r-- | include/qapi/qmp/qobject.h | 10 |
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_; } |