Commit 4ffcaa2f authored by Stefan Behnel's avatar Stefan Behnel

Stop using "PyBytesObject.ob_shash" in Py3.11, where it is deprecated. It was...

Stop using "PyBytesObject.ob_shash" in Py3.11, where it is deprecated. It was just an optimisation that isn't very important for byte strings any more.

Closes https://github.com/cython/cython/issues/4721
parent ebe51557
......@@ -314,7 +314,7 @@ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int eq
return (equals == Py_EQ);
} else {
int result;
#if CYTHON_USE_UNICODE_INTERNALS
#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
Py_hash_t hash1, hash2;
hash1 = ((PyBytesObject*)s1)->ob_shash;
hash2 = ((PyBytesObject*)s2)->ob_shash;
......
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