]> git.proxmox.com Git - mirror_qemu.git/blobdiff - qobject/qnull.c
Merge tag 'pull-maintainer-may24-160524-2' of https://gitlab.com/stsquad/qemu into...
[mirror_qemu.git] / qobject / qnull.c
index 9873e266e616ed5082113039c7bdb30616c131da..445a5db7f36f83b568e30bf619e5a2d49d7f610e 100644 (file)
  * or later.  See the COPYING.LIB file in the top-level directory.
  */
 
-#include "qemu-common.h"
-#include "qapi/qmp/qobject.h"
+#include "qemu/osdep.h"
+#include "qapi/qmp/qnull.h"
+#include "qobject-internal.h"
 
-static void qnull_destroy_obj(QObject *obj)
+QNull qnull_ = {
+    .base = {
+        .type = QTYPE_QNULL,
+        .refcnt = 1,
+    },
+};
+
+/**
+ * qnull_is_equal(): Always return true because any two QNull objects
+ * are equal.
+ */
+bool qnull_is_equal(const QObject *x, const QObject *y)
 {
-    assert(0);
+    return true;
 }
 
-static const QType qnull_type = {
-    .code = QTYPE_QNULL,
-    .destroy = qnull_destroy_obj,
-};
-
-QObject qnull_ = {
-    .type = &qnull_type,
-    .refcnt = 1,
-};
+void qnull_unref(QNull *q)
+{
+    qobject_unref(q);
+}