Commit 0b9a8269 authored by Stefan Behnel's avatar Stefan Behnel

Avoid a C compiler warning about a dead condition in Py3.6+.

parent e09db168
...@@ -1216,7 +1216,7 @@ done: ...@@ -1216,7 +1216,7 @@ done:
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
PyObject *dict, PyObject *mkw, PyObject *dict, PyObject *mkw,
int calculate_metaclass, int allow_py2_metaclass) { int calculate_metaclass, int allow_py2_metaclass) {
PyObject *result, *mc_kwargs; PyObject *result;
PyObject *owned_metaclass = NULL; PyObject *owned_metaclass = NULL;
PyObject *margs[4] = {NULL, name, bases, dict}; PyObject *margs[4] = {NULL, name, bases, dict};
if (allow_py2_metaclass) { if (allow_py2_metaclass) {
...@@ -1237,10 +1237,14 @@ static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObj ...@@ -1237,10 +1237,14 @@ static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObj
return NULL; return NULL;
owned_metaclass = metaclass; owned_metaclass = metaclass;
} }
// Before PEP-487, type(a,b,c) did not accept any keyword arguments, so guard at least against that case. result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET,
mc_kwargs = (PY_VERSION_HEX >= 0x030600A4) ? mkw : ( #if PY_VERSION_HEX < 0x030600A4
(metaclass == (PyObject*)&PyType_Type) ? NULL : mkw); // Before PEP-487, type(a,b,c) did not accept any keyword arguments, so guard at least against that case.
result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mc_kwargs); (metaclass == (PyObject*)&PyType_Type) ? NULL : mkw
#else
mkw
#endif
);
Py_XDECREF(owned_metaclass); Py_XDECREF(owned_metaclass);
#if PY_VERSION_HEX < 0x030600A4 && CYTHON_PEP487_INIT_SUBCLASS #if PY_VERSION_HEX < 0x030600A4 && CYTHON_PEP487_INIT_SUBCLASS
......
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