qapi: allow unions to contain further unions
[qemu/armbru.git] / qobject / qobject-internal.h
blobb310c8e1b58456a505f4f962083518b415ca9c3d
1 /*
2 * QObject internals
4 * Copyright (C) 2015 Red Hat, Inc.
6 * This work is licensed under the terms of the GNU LGPL, version 2.1
7 * or later. See the COPYING.LIB file in the top-level directory.
8 */
10 #ifndef QOBJECT_INTERNAL_H
11 #define QOBJECT_INTERNAL_H
13 #include "qapi/qmp/qobject.h"
15 static inline void qobject_init(QObject *obj, QType type)
17 assert(QTYPE_NONE < type && type < QTYPE__MAX);
18 obj->base.refcnt = 1;
19 obj->base.type = type;
22 void qbool_destroy_obj(QObject *obj);
23 bool qbool_is_equal(const QObject *x, const QObject *y);
25 void qdict_destroy_obj(QObject *obj);
26 bool qdict_is_equal(const QObject *x, const QObject *y);
28 void qlist_destroy_obj(QObject *obj);
29 bool qlist_is_equal(const QObject *x, const QObject *y);
31 bool qnull_is_equal(const QObject *x, const QObject *y);
33 void qnum_destroy_obj(QObject *obj);
34 bool qnum_is_equal(const QObject *x, const QObject *y);
36 void qstring_destroy_obj(QObject *obj);
37 bool qstring_is_equal(const QObject *x, const QObject *y);
39 #endif