blob: b310c8e1b58456a505f4f962083518b415ca9c3d [file] [log] [blame]
Markus Armbruster80d71122020-12-11 18:11:40 +01001/*
2 * QObject internals
3 *
4 * Copyright (C) 2015 Red Hat, Inc.
5 *
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 */
9
10#ifndef QOBJECT_INTERNAL_H
11#define QOBJECT_INTERNAL_H
12
13#include "qapi/qmp/qobject.h"
14
15static inline void qobject_init(QObject *obj, QType type)
16{
17 assert(QTYPE_NONE < type && type < QTYPE__MAX);
18 obj->base.refcnt = 1;
19 obj->base.type = type;
20}
21
22void qbool_destroy_obj(QObject *obj);
23bool qbool_is_equal(const QObject *x, const QObject *y);
24
25void qdict_destroy_obj(QObject *obj);
26bool qdict_is_equal(const QObject *x, const QObject *y);
27
28void qlist_destroy_obj(QObject *obj);
29bool qlist_is_equal(const QObject *x, const QObject *y);
30
31bool qnull_is_equal(const QObject *x, const QObject *y);
32
33void qnum_destroy_obj(QObject *obj);
34bool qnum_is_equal(const QObject *x, const QObject *y);
35
36void qstring_destroy_obj(QObject *obj);
37bool qstring_is_equal(const QObject *x, const QObject *y);
38
39#endif