summaryrefslogtreecommitdiffstats
path: root/Objects/typeobject.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-12-05 16:04:32 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-12-05 16:04:32 (GMT)
commit7bfb42d5b7721ca26e33050d025fec5c43c00058 (patch)
treec1c91a2a34361474de2c02388c8f91d4333f2ea5 /Objects/typeobject.c
parentd77e5b7211e8daf22f2b3e0df124393bca504c38 (diff)
downloadcpython-7bfb42d5b7721ca26e33050d025fec5c43c00058.zip
cpython-7bfb42d5b7721ca26e33050d025fec5c43c00058.tar.gz
cpython-7bfb42d5b7721ca26e33050d025fec5c43c00058.tar.bz2
Issue #28858: Remove _PyObject_CallArg1() macro
Replace _PyObject_CallArg1(func, arg) with PyObject_CallFunctionObjArgs(func, arg, NULL) Using the _PyObject_CallArg1() macro increases the usage of the C stack, which was unexpected and unwanted. PyObject_CallFunctionObjArgs() doesn't have this issue.
Diffstat (limited to 'Objects/typeobject.c')
-rw-r--r--Objects/typeobject.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 0af1534..d9699ef 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -5873,7 +5873,7 @@ slot_sq_item(PyObject *self, Py_ssize_t i)
goto error;
}
- retval = _PyObject_CallArg1(func, ival);
+ retval = PyObject_CallFunctionObjArgs(func, ival, NULL);
Py_DECREF(func);
Py_DECREF(ival);
return retval;
@@ -5914,7 +5914,7 @@ slot_sq_contains(PyObject *self, PyObject *value)
return -1;
}
if (func != NULL) {
- res = _PyObject_CallArg1(func, value);
+ res = PyObject_CallFunctionObjArgs(func, value, NULL);
Py_DECREF(func);
if (res != NULL) {
result = PyObject_IsTrue(res);
@@ -6284,7 +6284,7 @@ slot_tp_richcompare(PyObject *self, PyObject *other, int op)
PyErr_Clear();
Py_RETURN_NOTIMPLEMENTED;
}
- res = _PyObject_CallArg1(func, other);
+ res = PyObject_CallFunctionObjArgs(func, other, NULL);
Py_DECREF(func);
return res;
}