diff --git a/Cython/Compiler/Builtin.py b/Cython/Compiler/Builtin.py
index 0662ef0b3d0b18bf6f590f43cc549660a18b9a12..29c17a59724d74e8a6ee901bc3792d50811d88ec 100644
--- a/Cython/Compiler/Builtin.py
+++ b/Cython/Compiler/Builtin.py
@@ -36,7 +36,7 @@ static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject* iterator, PyObject*
             "%.200s object is not an iterator", iterator->ob_type->tp_name);
         return NULL;
     }
-    next = (*iterator->ob_type->tp_iternext)(iterator);
+    next = (*(Py_TYPE(iterator)->tp_iternext))(iterator);
     if (likely(next)) {
         return next;
     } else if (defval) {