qlit: rename compare_litqobj_to_qobj() to qlit_equal_qobject()

compare_litqobj_to_qobj() lacks a qlit_ prefix. Moreover, "compare"
suggests -1, 0, +1 for less than, equal and greater than. The
function actually returns non-zero for equal, zero for unequal.
Rename to qlit_equal_qobject().

Its return type will be cleaned up in the next patch.

Backports commit 60cc2eb7afd40b9cbaa35a5e0b54f365ac6e49f1 from qemu
This commit is contained in:
Marc-André Lureau 2018-03-07 17:14:53 -05:00 committed by Lioncash
parent b462c3929f
commit c51622c4ce
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7
16 changed files with 18 additions and 5 deletions

View file

@ -2812,6 +2812,7 @@
#define qlist_size qlist_size_aarch64
#define qlist_size_iter qlist_size_iter_aarch64
#define qlist_type qlist_type_aarch64
#define qlit_equal_qobject qlit_equal_qobject_aarch64
#define qobject_input_end_implicit_struct qobject_input_end_implicit_struct_aarch64
#define qobject_input_end_list qobject_input_end_list_aarch64
#define qobject_input_end_struct qobject_input_end_struct_aarch64

View file

@ -2812,6 +2812,7 @@
#define qlist_size qlist_size_aarch64eb
#define qlist_size_iter qlist_size_iter_aarch64eb
#define qlist_type qlist_type_aarch64eb
#define qlit_equal_qobject qlit_equal_qobject_aarch64eb
#define qobject_input_end_implicit_struct qobject_input_end_implicit_struct_aarch64eb
#define qobject_input_end_list qobject_input_end_list_aarch64eb
#define qobject_input_end_struct qobject_input_end_struct_aarch64eb

View file

@ -2812,6 +2812,7 @@
#define qlist_size qlist_size_arm
#define qlist_size_iter qlist_size_iter_arm
#define qlist_type qlist_type_arm
#define qlit_equal_qobject qlit_equal_qobject_arm
#define qobject_input_end_implicit_struct qobject_input_end_implicit_struct_arm
#define qobject_input_end_list qobject_input_end_list_arm
#define qobject_input_end_struct qobject_input_end_struct_arm

View file

@ -2812,6 +2812,7 @@
#define qlist_size qlist_size_armeb
#define qlist_size_iter qlist_size_iter_armeb
#define qlist_type qlist_type_armeb
#define qlit_equal_qobject qlit_equal_qobject_armeb
#define qobject_input_end_implicit_struct qobject_input_end_implicit_struct_armeb
#define qobject_input_end_list qobject_input_end_list_armeb
#define qobject_input_end_struct qobject_input_end_struct_armeb

View file

@ -230,7 +230,6 @@ symbols = (
'commonNaNToFloat32',
'commonNaNToFloat64',
'commonNaNToFloatx80',
'compare_litqobj_to_qobj',
'compute_abs_deadline',
'cond_name',
'configure_accelerator',
@ -2819,6 +2818,7 @@ symbols = (
'qlist_size',
'qlist_size_iter',
'qlist_type',
'qlit_equal_qobject',
'qobject_input_end_implicit_struct',
'qobject_input_end_list',
'qobject_input_end_struct',

View file

@ -44,6 +44,6 @@ struct QLitDictEntry {
#define QLIT_QLIST(val) \
{ .type = QTYPE_QLIST, .value.qlist = (val) }
int compare_litqobj_to_qobj(QLitObject *lhs, QObject *rhs);
int qlit_equal_qobject(QLitObject *lhs, QObject *rhs);
#endif /* QLIT_H */

View file

@ -2812,6 +2812,7 @@
#define qlist_size qlist_size_m68k
#define qlist_size_iter qlist_size_iter_m68k
#define qlist_type qlist_type_m68k
#define qlit_equal_qobject qlit_equal_qobject_m68k
#define qobject_input_end_implicit_struct qobject_input_end_implicit_struct_m68k
#define qobject_input_end_list qobject_input_end_list_m68k
#define qobject_input_end_struct qobject_input_end_struct_m68k

View file

@ -2812,6 +2812,7 @@
#define qlist_size qlist_size_mips
#define qlist_size_iter qlist_size_iter_mips
#define qlist_type qlist_type_mips
#define qlit_equal_qobject qlit_equal_qobject_mips
#define qobject_input_end_implicit_struct qobject_input_end_implicit_struct_mips
#define qobject_input_end_list qobject_input_end_list_mips
#define qobject_input_end_struct qobject_input_end_struct_mips

View file

@ -2812,6 +2812,7 @@
#define qlist_size qlist_size_mips64
#define qlist_size_iter qlist_size_iter_mips64
#define qlist_type qlist_type_mips64
#define qlit_equal_qobject qlit_equal_qobject_mips64
#define qobject_input_end_implicit_struct qobject_input_end_implicit_struct_mips64
#define qobject_input_end_list qobject_input_end_list_mips64
#define qobject_input_end_struct qobject_input_end_struct_mips64

View file

@ -2812,6 +2812,7 @@
#define qlist_size qlist_size_mips64el
#define qlist_size_iter qlist_size_iter_mips64el
#define qlist_type qlist_type_mips64el
#define qlit_equal_qobject qlit_equal_qobject_mips64el
#define qobject_input_end_implicit_struct qobject_input_end_implicit_struct_mips64el
#define qobject_input_end_list qobject_input_end_list_mips64el
#define qobject_input_end_struct qobject_input_end_struct_mips64el

View file

@ -2812,6 +2812,7 @@
#define qlist_size qlist_size_mipsel
#define qlist_size_iter qlist_size_iter_mipsel
#define qlist_type qlist_type_mipsel
#define qlit_equal_qobject qlit_equal_qobject_mipsel
#define qobject_input_end_implicit_struct qobject_input_end_implicit_struct_mipsel
#define qobject_input_end_list qobject_input_end_list_mipsel
#define qobject_input_end_struct qobject_input_end_struct_mipsel

View file

@ -2812,6 +2812,7 @@
#define qlist_size qlist_size_powerpc
#define qlist_size_iter qlist_size_iter_powerpc
#define qlist_type qlist_type_powerpc
#define qlit_equal_qobject qlit_equal_qobject_powerpc
#define qobject_input_end_implicit_struct qobject_input_end_implicit_struct_powerpc
#define qobject_input_end_list qobject_input_end_list_powerpc
#define qobject_input_end_struct qobject_input_end_struct_powerpc

View file

@ -42,10 +42,10 @@ static void compare_helper(QObject *obj, void *opaque)
}
helper->result =
compare_litqobj_to_qobj(&helper->objs[helper->index++], obj);
qlit_equal_qobject(&helper->objs[helper->index++], obj);
}
int compare_litqobj_to_qobj(QLitObject *lhs, QObject *rhs)
int qlit_equal_qobject(QLitObject *lhs, QObject *rhs)
{
int64_t val;
@ -67,7 +67,7 @@ int compare_litqobj_to_qobj(QLitObject *lhs, QObject *rhs)
QObject *obj = qdict_get(qobject_to_qdict(rhs),
lhs->value.qdict[i].key);
if (!compare_litqobj_to_qobj(&lhs->value.qdict[i].value, obj)) {
if (!qlit_equal_qobject(&lhs->value.qdict[i].value, obj)) {
return 0;
}
}

View file

@ -2812,6 +2812,7 @@
#define qlist_size qlist_size_sparc
#define qlist_size_iter qlist_size_iter_sparc
#define qlist_type qlist_type_sparc
#define qlit_equal_qobject qlit_equal_qobject_sparc
#define qobject_input_end_implicit_struct qobject_input_end_implicit_struct_sparc
#define qobject_input_end_list qobject_input_end_list_sparc
#define qobject_input_end_struct qobject_input_end_struct_sparc

View file

@ -2812,6 +2812,7 @@
#define qlist_size qlist_size_sparc64
#define qlist_size_iter qlist_size_iter_sparc64
#define qlist_type qlist_type_sparc64
#define qlit_equal_qobject qlit_equal_qobject_sparc64
#define qobject_input_end_implicit_struct qobject_input_end_implicit_struct_sparc64
#define qobject_input_end_list qobject_input_end_list_sparc64
#define qobject_input_end_struct qobject_input_end_struct_sparc64

View file

@ -2812,6 +2812,7 @@
#define qlist_size qlist_size_x86_64
#define qlist_size_iter qlist_size_iter_x86_64
#define qlist_type qlist_type_x86_64
#define qlit_equal_qobject qlit_equal_qobject_x86_64
#define qobject_input_end_implicit_struct qobject_input_end_implicit_struct_x86_64
#define qobject_input_end_list qobject_input_end_list_x86_64
#define qobject_input_end_struct qobject_input_end_struct_x86_64