summaryrefslogtreecommitdiff
path: root/Objects/genobject.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-12-01 14:51:04 +0100
committerVictor Stinner <victor.stinner@gmail.com>2016-12-01 14:51:04 +0100
commit3f6ef1e99f7c517a21d4f53c63b0aeef7e5b5b2c (patch)
treea3d3b6437f8bee2247876de339b323b1e8055ab7 /Objects/genobject.c
parent4bfba3d29e12e5ccb20fa324b76b7c19850fd7c4 (diff)
downloadcpython-3f6ef1e99f7c517a21d4f53c63b0aeef7e5b5b2c.tar.gz
Replace PyObject_CallFunction() with fastcall
Replace PyObject_CallFunction(func, "O", arg) and PyObject_CallFunction(func, "O", arg, NULL) with _PyObject_CallArg1(func, arg) Replace PyObject_CallFunction(func, NULL) with _PyObject_CallNoArg(func) _PyObject_CallNoArg() and _PyObject_CallArg1() are simpler and don't allocate memory on the C stack.
Diffstat (limited to 'Objects/genobject.c')
-rw-r--r--Objects/genobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/genobject.c b/Objects/genobject.c
index 1db83c9d64..0484b1c677 100644
--- a/Objects/genobject.c
+++ b/Objects/genobject.c
@@ -1341,7 +1341,7 @@ async_gen_init_hooks(PyAsyncGenObject *o)
PyObject *res;
Py_INCREF(firstiter);
- res = PyObject_CallFunction(firstiter, "O", o);
+ res = _PyObject_CallArg1(firstiter, o);
Py_DECREF(firstiter);
if (res == NULL) {
return 1;