aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2017-06-26 19:25:14 +0200
committerMarkus Armbruster <armbru@redhat.com>2017-07-24 13:35:11 +0200
commit4d2d5c41a9e8ee201cda8be8701f7f9fc92e71aa (patch)
treebf7c9f1260f68a8e9d9409fd664225e324414721 /include
parentd2f95f4d482374485234790a6fc3cca29ebb7355 (diff)
downloadqemu-4d2d5c41a9e8ee201cda8be8701f7f9fc92e71aa.zip
qemu-4d2d5c41a9e8ee201cda8be8701f7f9fc92e71aa.tar.gz
qemu-4d2d5c41a9e8ee201cda8be8701f7f9fc92e71aa.tar.bz2
qapi: Introduce a first class 'null' type
I expect the 'null' type to be useful mostly for members of alternate types. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/qapi/qmp/qobject.h4
-rw-r--r--include/qemu/typedefs.h1
2 files changed, 3 insertions, 2 deletions
diff --git a/include/qapi/qmp/qobject.h b/include/qapi/qmp/qobject.h
index 3543b55..eab29ed 100644
--- a/include/qapi/qmp/qobject.h
+++ b/include/qapi/qmp/qobject.h
@@ -93,9 +93,9 @@ static inline QType qobject_type(const QObject *obj)
return obj->type;
}
-typedef struct QNull {
+struct QNull {
QObject base;
-} QNull;
+};
extern QNull qnull_;
diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h
index 7b0d4e7..39bc835 100644
--- a/include/qemu/typedefs.h
+++ b/include/qemu/typedefs.h
@@ -89,6 +89,7 @@ typedef struct QEMUSGList QEMUSGList;
typedef struct QEMUTimer QEMUTimer;
typedef struct QEMUTimerListGroup QEMUTimerListGroup;
typedef struct QObject QObject;
+typedef struct QNull QNull;
typedef struct RAMBlock RAMBlock;
typedef struct Range Range;
typedef struct SerialState SerialState;