diff options
author | Eric Blake | 2015-05-16 00:25:00 +0200 |
---|---|---|
committer | Markus Armbruster | 2015-06-22 17:40:00 +0200 |
commit | 34acbc95229f9f841bde83691a5af949c15e105b (patch) | |
tree | 10da2a91f4d06bae34b637df4f1997c8b54ed23d /include | |
parent | qobject: Use 'bool' for qbool (diff) | |
download | qemu-34acbc95229f9f841bde83691a5af949c15e105b.tar.gz qemu-34acbc95229f9f841bde83691a5af949c15e105b.tar.xz qemu-34acbc95229f9f841bde83691a5af949c15e105b.zip |
qobject: Use 'bool' inside qdict
Now that qbool is fixed, let's fix getting and setting a bool
value to a qdict member to also use C99 bool rather than int.
I audited all callers to ensure that the changed return type
will not cause any changed semantics.
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/qapi/qmp/qdict.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/qapi/qmp/qdict.h b/include/qapi/qmp/qdict.h index 9fbf68ee0c..a37f4c1567 100644 --- a/include/qapi/qmp/qdict.h +++ b/include/qapi/qmp/qdict.h @@ -56,13 +56,13 @@ const QDictEntry *qdict_next(const QDict *qdict, const QDictEntry *entry); /* High level helpers */ double qdict_get_double(const QDict *qdict, const char *key); int64_t qdict_get_int(const QDict *qdict, const char *key); -int qdict_get_bool(const QDict *qdict, const char *key); +bool qdict_get_bool(const QDict *qdict, const char *key); QList *qdict_get_qlist(const QDict *qdict, const char *key); QDict *qdict_get_qdict(const QDict *qdict, const char *key); const char *qdict_get_str(const QDict *qdict, const char *key); int64_t qdict_get_try_int(const QDict *qdict, const char *key, int64_t def_value); -int qdict_get_try_bool(const QDict *qdict, const char *key, int def_value); +bool qdict_get_try_bool(const QDict *qdict, const char *key, bool def_value); const char *qdict_get_try_str(const QDict *qdict, const char *key); void qdict_copy_default(QDict *dst, QDict *src, const char *key); |