diff --git a/qemu/include/qapi/qmp/qbool.h b/qemu/include/qapi/qmp/qbool.h index a958ddbf..0f00aa39 100644 --- a/qemu/include/qapi/qmp/qbool.h +++ b/qemu/include/qapi/qmp/qbool.h @@ -24,7 +24,6 @@ struct QBool { QBool *qbool_from_bool(bool value); bool qbool_get_bool(const QBool *qb); -QBool *qobject_to_qbool(const QObject *obj); bool qbool_is_equal(const QObject *x, const QObject *y); void qbool_destroy_obj(QObject *obj); diff --git a/qemu/include/qapi/qmp/qdict.h b/qemu/include/qapi/qmp/qdict.h index 3fd4d413..6a5ee9a6 100644 --- a/qemu/include/qapi/qmp/qdict.h +++ b/qemu/include/qapi/qmp/qdict.h @@ -40,7 +40,6 @@ 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); -QDict *qobject_to_qdict(const QObject *obj); bool qdict_is_equal(const QObject *x, const QObject *y); void qdict_iter(const QDict *qdict, void (*iter)(const char *key, QObject *obj, void *opaque), diff --git a/qemu/include/qapi/qmp/qlist.h b/qemu/include/qapi/qmp/qlist.h index c5705b51..c1d2ea2b 100644 --- a/qemu/include/qapi/qmp/qlist.h +++ b/qemu/include/qapi/qmp/qlist.h @@ -53,7 +53,6 @@ QObject *qlist_pop(QList *qlist); QObject *qlist_peek(QList *qlist); int qlist_empty(const QList *qlist); size_t qlist_size(const QList *qlist); -QList *qobject_to_qlist(const QObject *obj); bool qlist_is_equal(const QObject *x, const QObject *y); void qlist_destroy_obj(QObject *obj); diff --git a/qemu/include/qapi/qmp/qnum.h b/qemu/include/qapi/qmp/qnum.h index 15e3971c..3e47475b 100644 --- a/qemu/include/qapi/qmp/qnum.h +++ b/qemu/include/qapi/qmp/qnum.h @@ -68,7 +68,6 @@ double qnum_get_double(QNum *qn); char *qnum_to_string(QNum *qn); -QNum *qobject_to_qnum(const QObject *obj); bool qnum_is_equal(const QObject *x, const QObject *y); void qnum_destroy_obj(QObject *obj); diff --git a/qemu/include/qapi/qmp/qstring.h b/qemu/include/qapi/qmp/qstring.h index a3b9ba0a..f2c60ab4 100644 --- a/qemu/include/qapi/qmp/qstring.h +++ b/qemu/include/qapi/qmp/qstring.h @@ -31,7 +31,6 @@ const char *qstring_get_str(const QString *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); -QString *qobject_to_qstring(const QObject *obj); bool qstring_is_equal(const QObject *x, const QObject *y); void qstring_destroy_obj(QObject *obj); diff --git a/qemu/qobject/qbool.c b/qemu/qobject/qbool.c index 5be6277c..b5824992 100644 --- a/qemu/qobject/qbool.c +++ b/qemu/qobject/qbool.c @@ -39,17 +39,6 @@ bool qbool_get_bool(const QBool *qb) return qb->value; } -/** - * qobject_to_qbool(): Convert a QObject into a QBool - */ -QBool *qobject_to_qbool(const QObject *obj) -{ - if (!obj || qobject_type(obj) != QTYPE_QBOOL) { - return NULL; - } - return container_of(obj, QBool, base); -} - /** * qbool_is_equal(): Test whether the two QBools are equal */ diff --git a/qemu/qobject/qdict.c b/qemu/qobject/qdict.c index 2f268b3b..5fd95727 100644 --- a/qemu/qobject/qdict.c +++ b/qemu/qobject/qdict.c @@ -37,17 +37,6 @@ QDict *qdict_new(void) return qdict; } -/** - * qobject_to_qdict(): Convert a QObject into a QDict - */ -QDict *qobject_to_qdict(const QObject *obj) -{ - if (!obj || qobject_type(obj) != QTYPE_QDICT) { - return NULL; - } - return container_of(obj, QDict, base); -} - /** * tdb_hash(): based on the hash agorithm from gdbm, via tdb * (from module-init-tools) diff --git a/qemu/qobject/qlist.c b/qemu/qobject/qlist.c index ad40fbce..2b6f07be 100644 --- a/qemu/qobject/qlist.c +++ b/qemu/qobject/qlist.c @@ -154,17 +154,6 @@ size_t qlist_size(const QList *qlist) return count; } -/** - * qobject_to_qlist(): Convert a QObject into a QList - */ -QList *qobject_to_qlist(const QObject *obj) -{ - if (!obj || qobject_type(obj) != QTYPE_QLIST) { - return NULL; - } - return container_of(obj, QList, base); -} - /** * qlist_is_equal(): Test whether the two QLists are equal * diff --git a/qemu/qobject/qnum.c b/qemu/qobject/qnum.c index ea091cfa..1501c828 100644 --- a/qemu/qobject/qnum.c +++ b/qemu/qobject/qnum.c @@ -199,17 +199,6 @@ char *qnum_to_string(QNum *qn) return NULL; } -/** - * qobject_to_qnum(): Convert a QObject into a QNum - */ -QNum *qobject_to_qnum(const QObject *obj) -{ - if (!obj || qobject_type(obj) != QTYPE_QNUM) { - return NULL; - } - return container_of(obj, QNum, base); -} - /** * qnum_is_equal(): Test whether the two QNums are equal * diff --git a/qemu/qobject/qstring.c b/qemu/qobject/qstring.c index 0a09895e..66ea4423 100644 --- a/qemu/qobject/qstring.c +++ b/qemu/qobject/qstring.c @@ -104,17 +104,6 @@ void qstring_append_chr(QString *qstring, int c) qstring->string[qstring->length] = 0; } -/** - * qobject_to_qstring(): Convert a QObject to a QString - */ -QString *qobject_to_qstring(const QObject *obj) -{ - if (!obj || qobject_type(obj) != QTYPE_QSTRING) { - return NULL; - } - return container_of(obj, QString, base); -} - /** * qstring_get_str(): Return a pointer to the stored string *