aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/src/Objects/stringlib/eq.h
diff options
context:
space:
mode:
authororivej <orivej@yandex-team.ru>2022-02-10 16:44:49 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:44:49 +0300
commit718c552901d703c502ccbefdfc3c9028d608b947 (patch)
tree46534a98bbefcd7b1f3faa5b52c138ab27db75b7 /contrib/tools/python3/src/Objects/stringlib/eq.h
parente9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (diff)
downloadydb-718c552901d703c502ccbefdfc3c9028d608b947.tar.gz
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/tools/python3/src/Objects/stringlib/eq.h')
-rw-r--r--contrib/tools/python3/src/Objects/stringlib/eq.h40
1 files changed, 20 insertions, 20 deletions
diff --git a/contrib/tools/python3/src/Objects/stringlib/eq.h b/contrib/tools/python3/src/Objects/stringlib/eq.h
index 9c1058b86c..4efd518157 100644
--- a/contrib/tools/python3/src/Objects/stringlib/eq.h
+++ b/contrib/tools/python3/src/Objects/stringlib/eq.h
@@ -1,25 +1,25 @@
-/* Fast unicode equal function optimized for dictobject.c and setobject.c */
-
-/* Return 1 if two unicode objects are equal, 0 if not.
- * unicode_eq() is called when the hash of two unicode objects is equal.
- */
-Py_LOCAL_INLINE(int)
-unicode_eq(PyObject *aa, PyObject *bb)
-{
+/* Fast unicode equal function optimized for dictobject.c and setobject.c */
+
+/* Return 1 if two unicode objects are equal, 0 if not.
+ * unicode_eq() is called when the hash of two unicode objects is equal.
+ */
+Py_LOCAL_INLINE(int)
+unicode_eq(PyObject *aa, PyObject *bb)
+{
assert(PyUnicode_Check(aa));
assert(PyUnicode_Check(bb));
assert(PyUnicode_IS_READY(aa));
assert(PyUnicode_IS_READY(bb));
- PyUnicodeObject *a = (PyUnicodeObject *)aa;
- PyUnicodeObject *b = (PyUnicodeObject *)bb;
-
- if (PyUnicode_GET_LENGTH(a) != PyUnicode_GET_LENGTH(b))
- return 0;
- if (PyUnicode_GET_LENGTH(a) == 0)
- return 1;
- if (PyUnicode_KIND(a) != PyUnicode_KIND(b))
- return 0;
- return memcmp(PyUnicode_1BYTE_DATA(a), PyUnicode_1BYTE_DATA(b),
- PyUnicode_GET_LENGTH(a) * PyUnicode_KIND(a)) == 0;
-}
+ PyUnicodeObject *a = (PyUnicodeObject *)aa;
+ PyUnicodeObject *b = (PyUnicodeObject *)bb;
+
+ if (PyUnicode_GET_LENGTH(a) != PyUnicode_GET_LENGTH(b))
+ return 0;
+ if (PyUnicode_GET_LENGTH(a) == 0)
+ return 1;
+ if (PyUnicode_KIND(a) != PyUnicode_KIND(b))
+ return 0;
+ return memcmp(PyUnicode_1BYTE_DATA(a), PyUnicode_1BYTE_DATA(b),
+ PyUnicode_GET_LENGTH(a) * PyUnicode_KIND(a)) == 0;
+}