]> git.proxmox.com Git - mirror_qemu.git/commitdiff
qapi/qnull: Add own header
authorMax Reitz <mreitz@redhat.com>
Tue, 14 Nov 2017 18:01:23 +0000 (19:01 +0100)
committerMax Reitz <mreitz@redhat.com>
Fri, 17 Nov 2017 17:21:30 +0000 (18:21 +0100)
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-id: 20171114180128.17076-2-mreitz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
include/qapi/qmp/qdict.h
include/qapi/qmp/qnull.h [new file with mode: 0644]
include/qapi/qmp/qobject.h
include/qapi/qmp/types.h
qapi/qapi-clone-visitor.c
qapi/string-input-visitor.c
qobject/qnull.c
tests/check-qnull.c

index 6588c7f0c865bc9bcba752273fb9ef9535fd2a74..7ea5120c4a506c17f6782f8a8212233f09c1931c 100644 (file)
@@ -15,6 +15,7 @@
 
 #include "qapi/qmp/qobject.h"
 #include "qapi/qmp/qlist.h"
+#include "qapi/qmp/qnull.h"
 #include "qapi/qmp/qnum.h"
 #include "qemu/queue.h"
 
diff --git a/include/qapi/qmp/qnull.h b/include/qapi/qmp/qnull.h
new file mode 100644 (file)
index 0000000..d075549
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * QNull
+ *
+ * Copyright (C) 2015 Red Hat, Inc.
+ *
+ * Authors:
+ *  Markus Armbruster <armbru@redhat.com>
+ *
+ * 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 */
index eab29edd12c4d901c89e30b2911ddcd62f7d4cfa..ef1d1a92374df78c017ad6e43e4211d2c1b20fdd 100644 (file)
@@ -93,16 +93,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 */
index a4bc662bfb71ea3080b87882cb0f052892c2c090..749ac44dcbbd0eb41da2f969ecbbaddd176d4efd 100644 (file)
@@ -19,5 +19,6 @@
 #include "qapi/qmp/qstring.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qlist.h"
+#include "qapi/qmp/qnull.h"
 
 #endif /* QAPI_QMP_TYPES_H */
index d8b62792bc19f034c8fa977f3d3e1d245f591179..daab6819b486fa2e37ad55dcd85e390f9b9d4075 100644 (file)
@@ -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;
index 67a0a4a58b522153fa6debbf5890dc55402dcae2..b3fdd0827dd0f28e7efb12d23b52282cce5907f9 100644 (file)
@@ -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/option.h"
 #include "qemu/queue.h"
 #include "qemu/range.h"
index 69a21d1059a33015a34d43c85628130ef0edf3d6..bc9fd3162616a65df79489e0cf393967a1f5e3c1 100644 (file)
@@ -12,7 +12,7 @@
 
 #include "qemu/osdep.h"
 #include "qemu-common.h"
-#include "qapi/qmp/qobject.h"
+#include "qapi/qmp/qnull.h"
 
 QNull qnull_ = {
     .base = {
index 5c6eb0adc8ce19ccff0c4a207ab3eb9c5f9d2206..afa4400da117ee3de03743f436533a546b91f782 100644 (file)
@@ -8,7 +8,7 @@
  */
 #include "qemu/osdep.h"
 
-#include "qapi/qmp/qobject.h"
+#include "qapi/qmp/qnull.h"
 #include "qemu-common.h"
 #include "qapi/qobject-input-visitor.h"
 #include "qapi/qobject-output-visitor.h"