Commit 9d55b5ef authored by Stefan Behnel's avatar Stefan Behnel

Avoid inlining kwargs check function that only checks for errors and is not worth being inlined.

Also avoid double-check overhead for strigns and string subtypes in Py2: only needed in Py2.6 and not really worth it.
parent 666ee64c
......@@ -117,7 +117,7 @@ static void __Pyx_RaiseMappingExpectedError(PyObject* arg) {
//////////////////// KeywordStringCheck.proto ////////////////////
static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); /*proto*/
static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); /*proto*/
//////////////////// KeywordStringCheck ////////////////////
......@@ -125,7 +125,7 @@ static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char*
// were passed to a function, or if any keywords were passed to a
// function that does not accept them.
static CYTHON_INLINE int __Pyx_CheckKeywordStrings(
static int __Pyx_CheckKeywordStrings(
PyObject *kwdict,
const char* function_name,
int kw_allowed)
......@@ -140,7 +140,7 @@ static CYTHON_INLINE int __Pyx_CheckKeywordStrings(
#else
while (PyDict_Next(kwdict, &pos, &key, 0)) {
#if PY_MAJOR_VERSION < 3
if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key)))
if (unlikely(!PyString_Check(key)))
#endif
if (unlikely(!PyUnicode_Check(key)))
goto invalid_keyword_type;
......
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