-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
bpo-43502: Convert PyExceptionClass_Check from macro to static inline function #24875
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-43502: Convert PyExceptionClass_Check from macro to static inline function #24875
Conversation
cc. @vstinner Should the NEWS entry include more info? For example "the macro was problematic because it reused its arguments twice". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the function is not used in performance critical hot code, the macro can be converted to a regular function (not a static function).
My gut feeling is to convert |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Include/ contains more than 450+ functions defined as macros. I don't want to have to review 450 PRs to change all macros.
Do you have an idea on how many macros have the double evaluation bug?
Misc/NEWS.d/next/C API/2021-03-15-15-06-16.bpo-43502.G-uhre.rst
Outdated
Show resolved
Hide resolved
I doubt all of them are clearly problematic. I'll see if I can create a list of worst cases and put it on the issue. UPDATE There are 88 macros that reuse arguments in |
I'm closing this until there's some consensus regarding bpo-43502. |
https://bugs.python.org/issue43502