Home | History | Annotate | Download | only in qemu

Lines Matching refs:obj

66 #define QOBJECT(obj) (&(obj)->base)
69 #define QINCREF(obj) \
70 qobject_incref(QOBJECT(obj))
73 #define QDECREF(obj) \
74 qobject_decref(QOBJECT(obj))
77 #define QOBJECT_INIT(obj, qtype_type) \
78 obj->base.refcnt = 1; \
79 obj->base.type = qtype_type
84 static inline void qobject_incref(QObject *obj)
86 if (obj)
87 obj->refcnt++;
94 static inline void qobject_decref(QObject *obj)
96 if (obj && --obj->refcnt == 0) {
97 assert(obj->type != NULL);
98 assert(obj->type->destroy != NULL);
99 obj->type->destroy(obj);
106 static inline qtype_code qobject_type(const QObject *obj)
108 assert(obj->type != NULL);
109 return obj->type->code;