bpo-29548: Recommend PyObject_Call APIs over PyEval_Call APIs. by methane · Pull Request #75 · python/cpython (original) (raw)

PyEval_Call* APIs are not documented and they doesn't respect PY_SSIZE_T_CLEAN.
So add comment block to recommend them where PyEval_Call APIs are declared.

This commit also changes PyEval_CallMethod and PyEval_CallFunction implementation
same to PyObject_CallMethod and PyObject_CallFunction.

PyEval_CallFunction(callable, "i", (int)i) now calls callable(i) instead of raising TypeError.

I expect this allows compiler to share some code between PyEval_CallFunction and PyObject_CallFunction. But I'm not sure.


[bpo-29548]