qapi: Remove qobject_to_X() functions
authorMax Reitz <mreitz@redhat.com>
Sat, 24 Feb 2018 15:40:30 +0000 (16:40 +0100)
committerEric Blake <eblake@redhat.com>
Mon, 19 Mar 2018 19:58:36 +0000 (14:58 -0500)
They are no longer needed now.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Message-Id: <20180224154033.29559-5-mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
include/qapi/qmp/qbool.h
include/qapi/qmp/qdict.h
include/qapi/qmp/qlist.h
include/qapi/qmp/qnum.h
include/qapi/qmp/qstring.h
qobject/qbool.c
qobject/qdict.c
qobject/qlist.c
qobject/qnum.c
qobject/qstring.c

index 629c508d34f07103fe7d7024d53420a73f515479..b9a44a1bfe06d47f552bf29c138b0759de36f202 100644 (file)
@@ -23,7 +23,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);
 
index 7c6d844549552d3970513a2dc897fd3acfeb5ad5..2cc3e906f7be29b32b566df2ad2bb706350c1170 100644 (file)
@@ -39,7 +39,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),
index 5fd976a3981e2d2e4505cd57332f54bb673312aa..5c673acb060ac730079853e1d2d195db157dd8ec 100644 (file)
@@ -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);
 
index 15e3971c7f11ceb699afbcceec0f502c6ca8f9fe..3e47475b2cb663596f02dc8f46ebdf954a33191e 100644 (file)
@@ -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);
 
index 98070ef3d6ad54d1976d5c42cc4ac9a78b8799c4..b72843fc1b0168772fbb51d9b30cfd400b89b2ac 100644 (file)
@@ -30,7 +30,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);
 
index 5be6277cca8156d532c0a9fbb8e519af7c5f12fe..b58249925c2dc2c3d2a87de9b890287043b36184 100644 (file)
@@ -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
  */
index 1e588123d0044358df5d39023efcaa09c3f8b115..45c8b53361ff99bf215868a9c6fd7decb0c001fd 100644 (file)
@@ -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)
index 77f19ffda78307f548e2cf61e141e0db113d8767..954fe98375179d5c26305657c08a1ed9a6a5c684 100644 (file)
@@ -151,17 +151,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
  *
index ea091cfaa4b2037816c76e4ba05e745a29657844..1501c828323b9bbd4df7c0e041852c98d51cd01e 100644 (file)
@@ -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
  *
index 2b2153206dfe95ed022cc3fad0dc070efd9be5d6..8bae529ef79b4e02412259f6ad809887a0eb3297 100644 (file)
@@ -105,17 +105,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
  *