aboutsummaryrefslogtreecommitdiffstats
path: root/qobject/qnull.c
diff options
context:
space:
mode:
Diffstat (limited to 'qobject/qnull.c')
-rw-r--r--qobject/qnull.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/qobject/qnull.c b/qobject/qnull.c
new file mode 100644
index 000000000..b26b36821
--- /dev/null
+++ b/qobject/qnull.c
@@ -0,0 +1,31 @@
+/*
+ * 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.
+ */
+
+#include "qemu/osdep.h"
+#include "qapi/qmp/qnull.h"
+#include "qobject-internal.h"
+
+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)
+{
+ return true;
+}