summaryrefslogtreecommitdiffstats
path: root/src/qobject/qnull.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/qobject/qnull.c')
-rw-r--r--src/qobject/qnull.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/qobject/qnull.c b/src/qobject/qnull.c
new file mode 100644
index 0000000..9873e26
--- /dev/null
+++ b/src/qobject/qnull.c
@@ -0,0 +1,29 @@
+/*
+ * 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-common.h"
+#include "qapi/qmp/qobject.h"
+
+static void qnull_destroy_obj(QObject *obj)
+{
+ assert(0);
+}
+
+static const QType qnull_type = {
+ .code = QTYPE_QNULL,
+ .destroy = qnull_destroy_obj,
+};
+
+QObject qnull_ = {
+ .type = &qnull_type,
+ .refcnt = 1,
+};
OpenPOWER on IntegriCloud