diff options
-rw-r--r-- | Cython/Utility/ExtensionTypes.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Cython/Utility/ExtensionTypes.c b/Cython/Utility/ExtensionTypes.c index dba3cdd50..82a68c5d1 100644 --- a/Cython/Utility/ExtensionTypes.c +++ b/Cython/Utility/ExtensionTypes.c @@ -343,7 +343,7 @@ __PYX_GOOD: static CYTHON_INLINE PyObject *{{func_name}}_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right {{extra_arg_decl}}) { {{slot_type}} slot; -#if !CYTHON_COMPILING_IN_LIMITED_API +#if CYTHON_USE_TYPE_SLOTS || PY_MAJOR_VERSION < 3 slot = type->tp_as_number ? type->tp_as_number->{{slot_name}} : NULL; #else slot = ({{slot_type}}) PyType_GetSlot(type, Py_{{slot_name}}); |