Commit e3133b75 authored by Stefan Behnel's avatar Stefan Behnel

also fix up keyword type checking function to allow Unicode strings

parent a8f70e22
...@@ -130,10 +130,9 @@ static CYTHON_INLINE int __Pyx_CheckKeywordStrings( ...@@ -130,10 +130,9 @@ static CYTHON_INLINE int __Pyx_CheckKeywordStrings(
while (PyDict_Next(kwdict, &pos, &key, 0)) { while (PyDict_Next(kwdict, &pos, &key, 0)) {
#if PY_MAJOR_VERSION < 3 #if PY_MAJOR_VERSION < 3
if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key)))
#else
if (unlikely(!PyUnicode_Check(key)))
#endif #endif
goto invalid_keyword_type; if (unlikely(!PyUnicode_Check(key)))
goto invalid_keyword_type;
} }
if ((!kw_allowed) && unlikely(key)) if ((!kw_allowed) && unlikely(key))
goto invalid_keyword; goto invalid_keyword;
......
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