diff --git a/qemu/include/qapi/qmp/qdict.h b/qemu/include/qapi/qmp/qdict.h index 7befc535..14b01933 100644 --- a/qemu/include/qapi/qmp/qdict.h +++ b/qemu/include/qapi/qmp/qdict.h @@ -15,7 +15,6 @@ #include "qapi/qmp/qobject.h" #include "qapi/qmp/qlist.h" -#include "qapi/qmp/qnum.h" #include "qemu/queue.h" #include "unicorn/platform.h" diff --git a/qemu/include/qapi/qmp/qlist.h b/qemu/include/qapi/qmp/qlist.h index 112a086e..ec2dd961 100644 --- a/qemu/include/qapi/qmp/qlist.h +++ b/qemu/include/qapi/qmp/qlist.h @@ -14,7 +14,6 @@ #define QLIST_H #include "qapi/qmp/qobject.h" -#include "qapi/qmp/qnum.h" #include "qemu/queue.h" typedef struct QListEntry { diff --git a/qemu/include/qapi/qmp/qnull.h b/qemu/include/qapi/qmp/qnull.h new file mode 100644 index 00000000..d0755492 --- /dev/null +++ b/qemu/include/qapi/qmp/qnull.h @@ -0,0 +1,30 @@ +/* + * QNull + * + * Copyright (C) 2015 Red Hat, Inc. + * + * Authors: + * Markus Armbruster + * + * This work is licensed under the terms of the GNU LGPL, version 2.1 + * or later. See the COPYING.LIB file in the top-level directory. + */ + +#ifndef QNULL_H +#define QNULL_H + +#include "qapi/qmp/qobject.h" + +struct QNull { + QObject base; +}; + +extern QNull qnull_; + +static inline QNull *qnull(void) +{ + QINCREF(&qnull_); + return &qnull_; +} + +#endif /* QNULL_H */ diff --git a/qemu/include/qapi/qmp/qobject.h b/qemu/include/qapi/qmp/qobject.h index 6d17b8df..de0daf0f 100644 --- a/qemu/include/qapi/qmp/qobject.h +++ b/qemu/include/qapi/qmp/qobject.h @@ -99,16 +99,4 @@ static inline QType qobject_type(const QObject *obj) return obj->type; } -struct QNull { - QObject base; -}; - -extern QNull qnull_; - -static inline QNull *qnull(void) -{ - QINCREF(&qnull_); - return &qnull_; -} - #endif /* QOBJECT_H */ diff --git a/qemu/qapi/qapi-clone-visitor.c b/qemu/qapi/qapi-clone-visitor.c index d8b62792..daab6819 100644 --- a/qemu/qapi/qapi-clone-visitor.c +++ b/qemu/qapi/qapi-clone-visitor.c @@ -12,6 +12,7 @@ #include "qapi/clone-visitor.h" #include "qapi/visitor-impl.h" #include "qapi/error.h" +#include "qapi/qmp/qnull.h" struct QapiCloneVisitor { Visitor visitor; diff --git a/qemu/qapi/string-input-visitor.c b/qemu/qapi/string-input-visitor.c index 0fc36c0b..4c94f550 100644 --- a/qemu/qapi/string-input-visitor.c +++ b/qemu/qapi/string-input-visitor.c @@ -16,6 +16,7 @@ #include "qapi/string-input-visitor.h" #include "qapi/visitor-impl.h" #include "qapi/qmp/qerror.h" +#include "qapi/qmp/qnull.h" #include "qemu/queue.h" #include "qemu/range.h" #include // strtoll diff --git a/qemu/qobject/qnull.c b/qemu/qobject/qnull.c index cb3eeec5..a651ba8e 100644 --- a/qemu/qobject/qnull.c +++ b/qemu/qobject/qnull.c @@ -11,7 +11,7 @@ */ #include "qemu-common.h" -#include "qapi/qmp/qobject.h" +#include "qapi/qmp/qnull.h" QNull qnull_ = { {