qemu

FORK: QEMU emulator
git clone https://git.neptards.moe/neptards/qemu.git
Log | Files | Refs | Submodules | LICENSE

qobject-internal.h (1009B)


      1 /*
      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 
     15 static 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 
     22 void qbool_destroy_obj(QObject *obj);
     23 bool qbool_is_equal(const QObject *x, const QObject *y);
     24 
     25 void qdict_destroy_obj(QObject *obj);
     26 bool qdict_is_equal(const QObject *x, const QObject *y);
     27 
     28 void qlist_destroy_obj(QObject *obj);
     29 bool qlist_is_equal(const QObject *x, const QObject *y);
     30 
     31 bool qnull_is_equal(const QObject *x, const QObject *y);
     32 
     33 void qnum_destroy_obj(QObject *obj);
     34 bool qnum_is_equal(const QObject *x, const QObject *y);
     35 
     36 void qstring_destroy_obj(QObject *obj);
     37 bool qstring_is_equal(const QObject *x, const QObject *y);
     38 
     39 #endif