diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2015-12-17 11:50:46 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2015-12-17 11:50:46 +0000 |
| commit | c1a5f950cdeeaea6a835b2b33f040a0e62c18662 (patch) | |
| tree | 1ed3aec2cd6480d626b30082ff3230c2c117014e /qobject/qint.c | |
| parent | fc77eb20d78e303ef11482288e185d856431f02f (diff) | |
| parent | bac5429ccb4f41d421ec641b11f1852c8420fdb7 (diff) | |
| download | focaccia-qemu-c1a5f950cdeeaea6a835b2b33f040a0e62c18662.tar.gz focaccia-qemu-c1a5f950cdeeaea6a835b2b33f040a0e62c18662.zip | |
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2015-12-17' into staging
QAPI patches for 2015-12-17 # gpg: Signature made Thu 17 Dec 2015 07:33:41 GMT using RSA key ID EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" * remotes/armbru/tags/pull-qapi-2015-12-17: (40 commits) qapi: Detect base class loops qapi: Move duplicate collision checks to schema check() qapi: Enforce (or whitelist) case conventions on qapi members qapi: Track enum values by QAPISchemaMember, not string qapi: Prepare new QAPISchemaMember base class qapi: Shorter visits of optional fields qapi: Simplify visits of optional fields qapi: Fix alternates that accept 'number' but not 'int' qapi: Inline _make_implicit_tag() qapi-types: Drop unnedeed ._fwdefn qapi: Simplify visiting of alternate types qapi: Convert QType into QAPI built-in enum type qobject: Rename qtype_code to QType qobject: Simplify QObject qapi: Change munging of CamelCase enum values qapi: Add alias for ErrorClass cpu: Convert CpuInfo into flat union qapi: Remove obsolete tests for MAX collision qapi: Don't let implicit enum MAX member collide qapi: Tighten the regex on valid names ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'qobject/qint.c')
| -rw-r--r-- | qobject/qint.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/qobject/qint.c b/qobject/qint.c index 999688e9ce..7cba9adf40 100644 --- a/qobject/qint.c +++ b/qobject/qint.c @@ -14,13 +14,6 @@ #include "qapi/qmp/qobject.h" #include "qemu-common.h" -static void qint_destroy_obj(QObject *obj); - -static const QType qint_type = { - .code = QTYPE_QINT, - .destroy = qint_destroy_obj, -}; - /** * qint_from_int(): Create a new QInt from an int64_t * @@ -31,8 +24,8 @@ QInt *qint_from_int(int64_t value) QInt *qi; qi = g_malloc(sizeof(*qi)); + qobject_init(QOBJECT(qi), QTYPE_QINT); qi->value = value; - QOBJECT_INIT(qi, &qint_type); return qi; } @@ -60,7 +53,7 @@ QInt *qobject_to_qint(const QObject *obj) * qint_destroy_obj(): Free all memory allocated by a * QInt object */ -static void qint_destroy_obj(QObject *obj) +void qint_destroy_obj(QObject *obj) { assert(obj != NULL); g_free(qobject_to_qint(obj)); |