[issue37483] Add PyObject_CallOneArg()

Inada Naoki report at bugs.python.org
Wed Jul 3 05:31:07 EDT 2019


Inada Naoki <songofacandy at gmail.com> added the comment:

AFAIK, gcc, clang, and MSVC support it.

Another cons is, general pitfall of macro:

  _PyObject_CALL_WITH_ARGS(func, PyDict_GetItem(d, key)); // PyDict_GetItem(d, key) is called twice.

If two or more arguments are not common, I prefer _PyObject_CallOneArg to macro.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37483>
_______________________________________


More information about the Python-bugs-list mailing list