diff options
Diffstat (limited to 'qobject/qdict.c')
-rw-r--r-- | qobject/qdict.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/qobject/qdict.c b/qobject/qdict.c index 2d67bf1579..19df837c55 100644 --- a/qobject/qdict.c +++ b/qobject/qdict.c @@ -19,13 +19,6 @@ #include "qemu/queue.h" #include "qemu-common.h" -static void qdict_destroy_obj(QObject *obj); - -static const QType qdict_type = { - .code = QTYPE_QDICT, - .destroy = qdict_destroy_obj, -}; - /** * qdict_new(): Create a new QDict * @@ -36,7 +29,7 @@ QDict *qdict_new(void) QDict *qdict; qdict = g_malloc0(sizeof(*qdict)); - QOBJECT_INIT(qdict, &qdict_type); + qobject_init(QOBJECT(qdict), QTYPE_QDICT); return qdict; } @@ -184,8 +177,7 @@ size_t qdict_size(const QDict *qdict) /** * qdict_get_obj(): Get a QObject of a specific type */ -static QObject *qdict_get_obj(const QDict *qdict, const char *key, - qtype_code type) +static QObject *qdict_get_obj(const QDict *qdict, const char *key, QType type) { QObject *obj; @@ -441,7 +433,7 @@ void qdict_del(QDict *qdict, const char *key) /** * qdict_destroy_obj(): Free all the memory allocated by a QDict */ -static void qdict_destroy_obj(QObject *obj) +void qdict_destroy_obj(QObject *obj) { int i; QDict *qdict; |