mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 15:15:46 +00:00
qobject: Move internals to qobject-internal.h
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20201211171152.146877-9-armbru@redhat.com>
This commit is contained in:
@ -23,7 +23,5 @@ struct QBool {
|
||||
|
||||
QBool *qbool_from_bool(bool value);
|
||||
bool qbool_get_bool(const QBool *qb);
|
||||
bool qbool_is_equal(const QObject *x, const QObject *y);
|
||||
void qbool_destroy_obj(QObject *obj);
|
||||
|
||||
#endif /* QBOOL_H */
|
||||
|
@ -39,10 +39,8 @@ void qdict_put_obj(QDict *qdict, const char *key, QObject *value);
|
||||
void qdict_del(QDict *qdict, const char *key);
|
||||
int qdict_haskey(const QDict *qdict, const char *key);
|
||||
QObject *qdict_get(const QDict *qdict, const char *key);
|
||||
bool qdict_is_equal(const QObject *x, const QObject *y);
|
||||
const QDictEntry *qdict_first(const QDict *qdict);
|
||||
const QDictEntry *qdict_next(const QDict *qdict, const QDictEntry *entry);
|
||||
void qdict_destroy_obj(QObject *obj);
|
||||
|
||||
/* Helper to qdict_put_obj(), accepts any object */
|
||||
#define qdict_put(qdict, key, obj) \
|
||||
|
@ -51,8 +51,6 @@ QObject *qlist_pop(QList *qlist);
|
||||
QObject *qlist_peek(QList *qlist);
|
||||
int qlist_empty(const QList *qlist);
|
||||
size_t qlist_size(const QList *qlist);
|
||||
bool qlist_is_equal(const QObject *x, const QObject *y);
|
||||
void qlist_destroy_obj(QObject *obj);
|
||||
|
||||
static inline const QListEntry *qlist_first(const QList *qlist)
|
||||
{
|
||||
|
@ -26,6 +26,4 @@ static inline QNull *qnull(void)
|
||||
return qobject_ref(&qnull_);
|
||||
}
|
||||
|
||||
bool qnull_is_equal(const QObject *x, const QObject *y);
|
||||
|
||||
#endif /* QNULL_H */
|
||||
|
@ -68,7 +68,4 @@ double qnum_get_double(QNum *qn);
|
||||
|
||||
char *qnum_to_string(QNum *qn);
|
||||
|
||||
bool qnum_is_equal(const QObject *x, const QObject *y);
|
||||
void qnum_destroy_obj(QObject *obj);
|
||||
|
||||
#endif /* QNUM_H */
|
||||
|
@ -64,14 +64,6 @@ QEMU_BUILD_BUG_MSG(QTYPE__MAX != 7,
|
||||
#define qobject_to(type, obj) \
|
||||
((type *)qobject_check_type(obj, glue(QTYPE_CAST_TO_, type)))
|
||||
|
||||
/* Initialize an object to default values */
|
||||
static inline void qobject_init(QObject *obj, QType type)
|
||||
{
|
||||
assert(QTYPE_NONE < type && type < QTYPE__MAX);
|
||||
obj->base.refcnt = 1;
|
||||
obj->base.type = type;
|
||||
}
|
||||
|
||||
static inline void qobject_ref_impl(QObject *obj)
|
||||
{
|
||||
if (obj) {
|
||||
@ -90,6 +82,7 @@ bool qobject_is_equal(const QObject *x, const QObject *y);
|
||||
|
||||
/**
|
||||
* qobject_destroy(): Free resources used by the object
|
||||
* For use via qobject_unref() only!
|
||||
*/
|
||||
void qobject_destroy(QObject *obj);
|
||||
|
||||
|
@ -33,7 +33,5 @@ const char *qobject_get_try_str(const QObject *qstring);
|
||||
void qstring_append_int(QString *qstring, int64_t value);
|
||||
void qstring_append(QString *qstring, const char *str);
|
||||
void qstring_append_chr(QString *qstring, int c);
|
||||
bool qstring_is_equal(const QObject *x, const QObject *y);
|
||||
void qstring_destroy_obj(QObject *obj);
|
||||
|
||||
#endif /* QSTRING_H */
|
||||
|
Reference in New Issue
Block a user