This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients jdemeyer, methane, vstinner
Date 2019-07-03.09:29:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1562146182.84.0.455970196106.issue37483@roundup.psfhosted.org>
In-reply-to
Content
> 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.)
History
Date User Action Args
2019-07-03 09:29:42vstinnersetrecipients: + vstinner, methane, jdemeyer
2019-07-03 09:29:42vstinnersetmessageid: <1562146182.84.0.455970196106.issue37483@roundup.psfhosted.org>
2019-07-03 09:29:42vstinnerlinkissue37483 messages
2019-07-03 09:29:42vstinnercreate