diff options
author | Eric Blake <eblake@redhat.com> | 2015-05-15 16:25:00 -0600 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2015-06-22 17:40:00 +0200 |
commit | 34acbc95229f9f841bde83691a5af949c15e105b (patch) | |
tree | 10da2a91f4d06bae34b637df4f1997c8b54ed23d /qobject/qdict.c | |
parent | fc48ffc39ed1060856475e4320d5896f26c945e8 (diff) |
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 'qobject/qdict.c')
-rw-r--r-- | qobject/qdict.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qobject/qdict.c b/qobject/qdict.c index 2cb0c3c5fc..67b1a58abf 100644 --- a/qobject/qdict.c +++ b/qobject/qdict.c @@ -241,7 +241,7 @@ int64_t qdict_get_int(const QDict *qdict, const char *key) * * Return bool mapped by 'key'. */ -int qdict_get_bool(const QDict *qdict, const char *key) +bool qdict_get_bool(const QDict *qdict, const char *key) { QObject *obj = qdict_get_obj(qdict, key, QTYPE_QBOOL); return qbool_get_bool(qobject_to_qbool(obj)); @@ -314,7 +314,7 @@ int64_t qdict_get_try_int(const QDict *qdict, const char *key, * dictionary or if the stored object is not of QBool type * 'def_value' will be returned. */ -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) { QObject *obj; |