Message347197
> Variadic macros are not part of C89, so that would require changing PEP 7.
PEP 7 uses C99 since Python 3.6:
https://www.python.org/dev/peps/pep-0007/#c-dialect
> What do you think about macro like this?
Macros cannot be used in all C extensions. For the PEP 587, I was asked to replace macros with functions.
I would prefer a PyObject_CallOneArg() function than yet another ugly and dangerous macro. Sometimes, a regular function is better for stack consumption: it doesn't increase the stack consumption in the call site, stack memory is "released" once PyObject_CallOneArg() exit. In the past, I had to disable inlining in some functions to reduce the stack consumption. (I'm not sure if this optimization is still around.) |
|
Date |
User |
Action |
Args |
2019-07-03 09:29:42 | vstinner | set | recipients:
+ vstinner, methane, jdemeyer |
2019-07-03 09:29:42 | vstinner | set | messageid: <1562146182.84.0.455970196106.issue37483@roundup.psfhosted.org> |
2019-07-03 09:29:42 | vstinner | link | issue37483 messages |
2019-07-03 09:29:42 | vstinner | create | |
|