Lines Matching defs:obj
67 #define QOBJECT(obj) (&(obj)->base)
70 #define QINCREF(obj) \
71 qobject_incref(QOBJECT(obj))
74 #define QDECREF(obj) \
75 qobject_decref(obj ? QOBJECT(obj) : NULL)
78 #define QOBJECT_INIT(obj, qtype_type) \
79 obj->base.refcnt = 1; \
80 obj->base.type = qtype_type
85 static inline void qobject_incref(QObject *obj)
87 if (obj)
88 obj->refcnt++;
95 static inline void qobject_decref(QObject *obj)
97 if (obj && --obj->refcnt == 0) {
98 assert(obj->type != NULL);
99 assert(obj->type->destroy != NULL);
100 obj->type->destroy(obj);
107 static inline qtype_code qobject_type(const QObject *obj)
109 assert(obj->type != NULL);
110 return obj->type->code;