From 34acbc95229f9f841bde83691a5af949c15e105b Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Fri, 15 May 2015 16:25:00 -0600 Subject: 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 Reviewed-by: Alberto Garcia Acked-by: Luiz Capitulino Signed-off-by: Markus Armbruster --- qobject/qdict.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'qobject') diff --git a/qobject/qdict.c b/qobject/qdict.c index 2cb0c3c..67b1a58 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; -- cgit v1.1