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:45:01 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:01 +0300
commit2d37894b1b037cf24231090eda8589bbb44fb6fc (patch)
treebe835aa92c6248212e705f25388ebafcf84bc7a1 /contrib/tools/python3/src/Objects/stringlib/eq.h
parent718c552901d703c502ccbefdfc3c9028d608b947 (diff)
downloadydb-2d37894b1b037cf24231090eda8589bbb44fb6fc.tar.gz
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 2 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 4efd518157..9c1058b86c 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;
+}