Commit 74b31485 authored by Claudio Freire's avatar Claudio Freire

Use CYTHON_PEP393_ENABLED to find the right hash

parent b451e03e
...@@ -193,15 +193,15 @@ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int ...@@ -193,15 +193,15 @@ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int
goto return_ne; goto return_ne;
} }
#if CYTHON_COMPILING_IN_CPYTHON #if CYTHON_COMPILING_IN_CPYTHON
#if PY_MAJOR_VAERSION < 3 #if CYTHON_PEP393_ENABLED
if (((PyUnicodeObject*)s1)->hash != ((PyUnicodeObject*)s2)->hash if (((PyASCIIObject*)s1)->hash != ((PyASCIIObject*)s2)->hash
&& ((PyUnicodeObject*)s1)->hash != -1 && ((PyUnicodeObject*)s2)->hash != -1) && ((PyASCIIObject*)s1)->hash != -1 && ((PyASCIIObject*)s2)->hash != -1)
{ {
goto return_ne; goto return_ne;
} }
#else #else
if (((PyASCIIObject*)s1)->hash != ((PyASCIIObject*)s2)->hash if (((PyUnicodeObject*)s1)->hash != ((PyUnicodeObject*)s2)->hash
&& ((PyASCIIObject*)s1)->hash != -1 && ((PyASCIIObject*)s2)->hash != -1) && ((PyUnicodeObject*)s1)->hash != -1 && ((PyUnicodeObject*)s2)->hash != -1)
{ {
goto return_ne; goto return_ne;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment