Skip to content
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

gh-92800: Fix C++ _Py_CAST with constant types #92818

Closed
wants to merge 3 commits into from

Conversation

da-woods
Copy link
Contributor

Thus fixing PyUnicode_READ in C++.
Fixes #92800

I've created a C++ helper struct definition to work out the
type with constant added (it's OK to add const to a constant
type in typedefs in C++).

Thus fixing PyUnicode_READ in C++.
Fixes python#92800

I've created a C++ helper struct definition to work out the
type with constant added (it's OK to add const to a constant
type in typedefs in C++).
@da-woods
Copy link
Contributor Author

da-woods commented May 15, 2022

I think this can be skipped in news.

I don't think it's hugely easy to add tests for this specifically - I think this requires Python to be tested with a C++ compiler (which I don't know if it is right now?) I've added a test now

I'm not hugely happy with adding a helper struct definition, but I can't see any other easy way to do this.

@da-woods
Copy link
Contributor Author

This was fixed elsewhere

@da-woods da-woods closed this May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PyUnicode_READ() fails to build on C++: _Py_CAST() used with a constant type (const void*)
2 participants