FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-92800: Fix C++ _Py_CAST with constant types by da-woods · Pull Request #92818 · python/cpython · GitHub

Repository navigation

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

Closed
da-woods wants to merge 3 commits into
python:mainfrom
da-woods:cpp_cast_92800
Closed

da-woods wants to merge 3 commits into
python:mainfrom
da-woods:cpp_cast_92800

Conversation

Copy link
Copy Markdown
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 commented May 15, 2022 •
edited
Loading

Copy link
Copy Markdown
Contributor Author

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.

Copy link
Copy Markdown
Contributor Author

This was fixed elsewhere

da-woods closed this May 17, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL