mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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>
This commit is contained in:
parent
fc48ffc39e
commit
34acbc9522
6 changed files with 28 additions and 28 deletions
|
@ -223,7 +223,7 @@ static void test_visitor_out_struct(TestOutputVisitorData *data,
|
|||
qdict = qobject_to_qdict(obj);
|
||||
g_assert_cmpint(qdict_size(qdict), ==, 3);
|
||||
g_assert_cmpint(qdict_get_int(qdict, "integer"), ==, 42);
|
||||
g_assert_cmpint(qdict_get_bool(qdict, "boolean"), ==, 0);
|
||||
g_assert_cmpint(qdict_get_bool(qdict, "boolean"), ==, false);
|
||||
g_assert_cmpstr(qdict_get_str(qdict, "string"), ==, "foo");
|
||||
|
||||
QDECREF(qdict);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue