Commit 2a1f74aa authored by Stefan Behnel's avatar Stefan Behnel

try to fix MSVC compilation problem by simplifying macro usage

parent cf2c2df7
......@@ -1289,14 +1289,17 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObjec
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
if (likely(PyCFunction_Check(func)
#ifdef __Pyx_CyFunction_USED
|| PyObject_TypeCheck(func, __pyx_CyFunctionType)
if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
#else
if (likely(PyCFunction_Check(func))) {
#endif
) && likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
// fast and simple case that we are optimising for
return __Pyx_PyObject_CallMethO(func, arg);
} else {
if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
// fast and simple case that we are optimising for
return __Pyx_PyObject_CallMethO(func, arg);
}
}
{
PyObject *result;
PyObject *args = PyTuple_New(1);
if (unlikely(!args)) return NULL;
......@@ -1333,16 +1336,17 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); /*proto
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
if (likely(PyCFunction_Check(func)
#ifdef __Pyx_CyFunction_USED
|| PyObject_TypeCheck(func, __pyx_CyFunctionType)
if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
#else
if (likely(PyCFunction_Check(func))) {
#endif
) && likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
// fast and simple case that we are optimising for
return __Pyx_PyObject_CallMethO(func, NULL);
} else {
return __Pyx_PyObject_Call(func, $empty_tuple, NULL);
if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
// fast and simple case that we are optimising for
return __Pyx_PyObject_CallMethO(func, NULL);
}
}
return __Pyx_PyObject_Call(func, $empty_tuple, NULL);
}
#endif
......
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