Commit 3c0b9b6b authored by Stefan Behnel's avatar Stefan Behnel

Avoid using PyUnicode_GET_SIZE() in PEP393 code.

parent 3d343a1c
...@@ -278,7 +278,7 @@ static int __Pyx_ParseOptionalKeywords( ...@@ -278,7 +278,7 @@ static int __Pyx_ParseOptionalKeywords(
while (*name) { while (*name) {
int cmp = (**name == key) ? 0 : int cmp = (**name == key) ? 0 :
#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
(PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
#endif #endif
// need to convert argument name from bytes to unicode for comparison // need to convert argument name from bytes to unicode for comparison
PyUnicode_Compare(**name, key); PyUnicode_Compare(**name, key);
...@@ -296,7 +296,7 @@ static int __Pyx_ParseOptionalKeywords( ...@@ -296,7 +296,7 @@ static int __Pyx_ParseOptionalKeywords(
while (argname != first_kw_arg) { while (argname != first_kw_arg) {
int cmp = (**argname == key) ? 0 : int cmp = (**argname == key) ? 0 :
#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
(PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
#endif #endif
// need to convert argument name from bytes to unicode for comparison // need to convert argument name from bytes to unicode for comparison
PyUnicode_Compare(**argname, key); PyUnicode_Compare(**argname, key);
......
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