INADA Naoki added the comment:

> The argument tuple can be NULL for PyEval_CallObject() (it then gets replaced 
> with an empty tuple), but will raise a segfault for PyObject_Call().

PyObject_CallObject() accepts NULL as args. Macro vs function is only 
difference of them.

On the other hand, PyObject_CallObjectWithKeyword() doesn't have identical 
function.
So I agree your suggestion to add NULL support to PyObject_Call().

We have more fast _PyObject_FastCall* APIs for performance critical code.
Additional cost to check NULL in PyObject_Call() would be negligible.

Any opinion from others?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29548>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to