[issue37483] Add PyObject_CallOneArg()
Inada Naoki
report at bugs.python.org
Tue Jul 2 20:47:37 EDT 2019
Inada Naoki <songofacandy at gmail.com> added the comment:
What do you think about macro like this?
#define _PyObject_CALL_WITH_ARGS(func, ...) \
_PyObject_Vectorcall(func, (PyObject*[]){NULL, __VA_ARGS__} + 1, \
sizeof((PyObject*[]){__VA_ARGS__})/sizeof(PyObject*) | PY_VECTORCALL_ARGUMENTS_OFFSET, \
NULL)
Pros: it can be used for 2 or 3 arguments too.
Cons: readability...
----------
nosy: +inada.naoki
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37483>
_______________________________________
More information about the Python-bugs-list
mailing list