bpo-43502: Convert PyExceptionClass_Check from macro to static inline function#24875
bpo-43502: Convert PyExceptionClass_Check from macro to static inline function#24875erlend-aasland wants to merge 3 commits intopython:masterfrom
Conversation
|
cc. @vstinner Should the NEWS entry include more info? For example "the macro was problematic because it reused its arguments twice". |
vstinner
left a comment
There was a problem hiding this comment.
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 |
vstinner
left a comment
There was a problem hiding this comment.
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