Message 403770 - Python tracker (original) (raw)
5 years ago, I added _PyObject_CallArg1() (similar to PyObject_CallOneArg()) and then I removed it since it consumed more stack memory than existing function, whereas I added _PyObject_CallArg1() to reduce the stack consumption.
commit 7bfb42d5b7721ca26e33050d025fec5c43c00058 Author: Victor Stinner <victor.stinner@gmail.com> Date: Mon Dec 5 17:04:32 2016 +0100
Issue [#28858](issue28858 "[closed] Fastcall uses more C stack"): 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.