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