diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2020-07-09 11:42:57 +0200 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2020-07-09 11:42:57 +0200 |
commit | 0a64e5df8401dd4f6a4067fe612e44729d2400c4 (patch) | |
tree | e1021896bec237455c4971a3c83d1b5793178c79 | |
parent | ecac244d3b71ef073202e03391120afdb031013b (diff) | |
download | cython-0a64e5df8401dd4f6a4067fe612e44729d2400c4.tar.gz |
Use the more appropriate CYTHON_USE_TYPE_SLOTS guard for accessing the binop number slot.
-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}}); |