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>
This commit is contained in:
Markus Armbruster 2017-06-26 13:52:24 +02:00
parent df95f1a298
commit 006ca09f30
7 changed files with 28 additions and 22 deletions

View file

@ -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_;
}