summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2020-04-20 09:17:54 +0200
committerStefan Behnel <stefan_ml@behnel.de>2020-04-20 09:17:54 +0200
commitfa0a316e7ecc254ba2a8d20630135639fcdd1ee2 (patch)
treec7a9c547e2ae44fc008a7872fd2250b51b725f3a
parent646952800ebbdcebfc4f899cce29114dff65949a (diff)
downloadcython-fa0a316e7ecc254ba2a8d20630135639fcdd1ee2.tar.gz
Fix C99-ism to make code C89 again.
-rw-r--r--Cython/Utility/ObjectHandling.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Cython/Utility/ObjectHandling.c b/Cython/Utility/ObjectHandling.c
index 2e9b50e8d..7481a258d 100644
--- a/Cython/Utility/ObjectHandling.c
+++ b/Cython/Utility/ObjectHandling.c
@@ -318,12 +318,13 @@ static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) {
static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) {
PyTypeObject *tp = Py_TYPE(obj);
+ PySequenceMethods *sm;
PyMappingMethods *mm = tp->tp_as_mapping;
if (likely(mm && mm->mp_subscript)) {
return mm->mp_subscript(obj, key);
}
- PySequenceMethods *sm = tp->tp_as_sequence;
+ sm = tp->tp_as_sequence;
if (likely(sm && sm->sq_item)) {
return __Pyx_PyObject_GetIndex(obj, key);
}