summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Objects/typeobject.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 4d259275b4..68e4f90ab6 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -6264,16 +6264,13 @@ slot_tp_iter(PyObject *self)
Py_TYPE(self)->tp_name);
return NULL;
}
+
if (func != NULL) {
- PyObject *args;
- args = res = PyTuple_New(0);
- if (args != NULL) {
- res = PyObject_Call(func, args, NULL);
- Py_DECREF(args);
- }
+ res = _PyObject_FastCall(func, NULL, 0, NULL);
Py_DECREF(func);
return res;
}
+
PyErr_Clear();
func = lookup_method(self, &PyId___getitem__);
if (func == NULL) {