mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
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.
This commit is contained in:
parent
d77e5b7211
commit
7bfb42d5b7
15 changed files with 25 additions and 26 deletions
|
|
@ -538,7 +538,8 @@ deque_copy(PyObject *deque)
|
|||
return NULL;
|
||||
}
|
||||
if (old_deque->maxlen < 0)
|
||||
return _PyObject_CallArg1((PyObject *)(Py_TYPE(deque)), deque);
|
||||
return PyObject_CallFunctionObjArgs((PyObject *)(Py_TYPE(deque)),
|
||||
deque, NULL);
|
||||
else
|
||||
return PyObject_CallFunction((PyObject *)(Py_TYPE(deque)), "Oi",
|
||||
deque, old_deque->maxlen, NULL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue