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 ngie
Recipients ngie
Date 2020-03-09.23:15:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1583795735.01.0.546271118334.issue39919@roundup.psfhosted.org>
In-reply-to
Content
Looking at Py_SAFE_DOWNCAST, it seems that the code could (in theory) leverage _Static_assert on C11 capable compilers [1].

Looking at some other code APIs, like module initialization with METH_VARARGS, etc, there are ways to determine whether or not the values are valid at compile-time with C11 capable compilers, instead of figuring out the issues on the tail end at runtime and having to play whackamole figuring out which offending methods are triggering issues (see also: bpo-39884).

1. https://en.cppreference.com/w/c/language/_Static_assert
History
Date User Action Args
2020-03-09 23:15:35ngiesetrecipients: + ngie
2020-03-09 23:15:35ngiesetmessageid: <1583795735.01.0.546271118334.issue39919@roundup.psfhosted.org>
2020-03-09 23:15:34ngielinkissue39919 messages
2020-03-09 23:15:34ngiecreate