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 WildCard65, erlendaasland, gregory.p.smith, numberZero, vstinner
Date 2021-03-11.15:15:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1615475720.29.0.101959025381.issue43181@roundup.psfhosted.org>
In-reply-to
Content
> Yet... the first argument is still unshielded, passed to a macro that expects one single macro argument.

Are you talking about the current code in the master branch or the 3.9 branch? If you are talking about the _PyObject_CAST(ob) call, would you mind to elaborate how it is an issue? The code in master LGTM.

> That’s not a regression, it wasn’t shielded in 3.8 either, but why not just parenthesise each macro argument that denotes an expression (as opposed to e.g. name)?

In the master branch, Include/ and its subdirectories contains 158 .h files for a total of 20K lines of C code. It's not easy to check all files. If you spotted bugs, would you mind to give examples, or a way to automatically detect bugs?

As I wrote previously, I dislike macros. If someone is changed, I would prefer to convert the function into a static inline function which doesn't have macros pitfalls.
History
Date User Action Args
2021-03-11 15:15:20vstinnersetrecipients: + vstinner, gregory.p.smith, WildCard65, erlendaasland, numberZero
2021-03-11 15:15:20vstinnersetmessageid: <1615475720.29.0.101959025381.issue43181@roundup.psfhosted.org>
2021-03-11 15:15:20vstinnerlinkissue43181 messages
2021-03-11 15:15:19vstinnercreate