Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.5k
[3.11] gh-93442: Make C++ version of _Py_CAST work with 0/NULL. (GH-93500)#93507
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…nGH-93500)Add C++ overloads for _Py_CAST_impl() to handle 0/NULL. This will allowC++ extensions that pass 0 or NULL to macros using _Py_CAST() tocontinue to compile. Without this, you get an error like: invalid ‘static_cast’ from type ‘int’ to type ‘_object*’The modern way to use a NULL value in C++ is to use nullptr. However,we want to not break extensions that do things the old way.Co-authored-by: serge-sans-paille(cherry picked from commit8bcc3fa)Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
ghost commentedJun 5, 2022
The following commit authors need to sign the Contributor License Agreement: |
miss-islington commentedJun 5, 2022
@nascheme: Status check is done, and it's a failure ❌ . |
miss-islington commentedJun 5, 2022
@nascheme: Status check is done, and it's a failure ❌ . |
1 similar comment
miss-islington commentedJun 5, 2022
@nascheme: Status check is done, and it's a failure ❌ . |
corona10 left a comment
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.
lgtm bot
Add C++ overloads for _Py_CAST_impl() to handle 0/NULL. This will allow
C++ extensions that pass 0 or NULL to macros using _Py_CAST() to
continue to compile. Without this, you get an error like:
The modern way to use a NULL value in C++ is to use nullptr. However,
we want to not break extensions that do things the old way.
Co-authored-by: serge-sans-paille
(cherry picked from commit8bcc3fa)
Co-authored-by: Neil Schemenauernas-github@arctrix.com