Commit 60f4080a authored by Stefan Behnel's avatar Stefan Behnel

Fix reference leak in Py2 string comparison code when comparing str with unicode.

parent 5a8d5aaf
...@@ -235,6 +235,9 @@ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int ...@@ -235,6 +235,9 @@ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int
} else { } else {
int result; int result;
PyObject* py_result = PyObject_RichCompare(s1, s2, equals); PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
#if PY_MAJOR_VERSION < 3
Py_XDECREF(owned_ref);
#endif
if (!py_result) if (!py_result)
return -1; return -1;
result = __Pyx_PyObject_IsTrue(py_result); result = __Pyx_PyObject_IsTrue(py_result);
......
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