xref: /openbmc/qemu/qobject/qnull.c (revision 0b2ff2ce)
1 /*
2  * QNull
3  *
4  * Copyright (C) 2015 Red Hat, Inc.
5  *
6  * Authors:
7  *  Markus Armbruster <armbru@redhat.com>
8  *
9  * This work is licensed under the terms of the GNU LGPL, version 2.1
10  * or later.  See the COPYING.LIB file in the top-level directory.
11  */
12 
13 #include "qemu-common.h"
14 #include "qapi/qmp/qobject.h"
15 
16 static void qnull_destroy_obj(QObject *obj)
17 {
18     assert(0);
19 }
20 
21 static const QType qnull_type = {
22     .code = QTYPE_QNULL,
23     .destroy = qnull_destroy_obj,
24 };
25 
26 QObject qnull_ = {
27     .type = &qnull_type,
28     .refcnt = 1,
29 };
30