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.
diff --git a/Objects/abstract.c b/Objects/abstract.c
index beb12c9..a6a58db 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -2496,7 +2496,7 @@
assert(args != NULL);
if (!PyTuple_Check(args)) {
- result = _PyObject_CallArg1(callable, args);
+ result = PyObject_CallFunctionObjArgs(callable, args, NULL);
}
else {
result = PyObject_Call(callable, args, NULL);