{{ message }}
bpo-45459: Add pytypedefs.h header file - #31527
Merged
Merged
Conversation
Move forward declarations of Python C API types to a new pytypedefs.h header file to solve interdependency issues between header files. pytypedefs.h contains forward declarations of the following types: * PyCodeObject * PyFrameObject * PyGetSetDef * PyInterpreterState * PyLongObject * PyMemberDef * PyMethodDef * PyModuleDef * PyObject * PyThreadState * PyTypeObject
Member
Author
Member
Author
Member
Author
|
If you don't want to go this way, I wrote the bare minimum fix for the clang compiler warning: GH-31539. But as I wrote in my previous comment, IMO it's now time to cleanup these forward declarations to have a sane way to fix this issuse in a single place. There are too many scattered forward declarations in the Python C API. |
Member
Author
Defining types in multiple header files is tricky. At my first attempt, I defined PyObject inside |
corona10
approved these changes
Feb 24, 2022
Contributor
asvetlov
pushed a commit
that referenced
this pull request
Feb 26, 2022
Move forward declarations of Python C API types to a new pytypedefs.h header file to solve interdependency issues between header files. pytypedefs.h contains forward declarations of the following types: * PyCodeObject * PyFrameObject * PyGetSetDef * PyInterpreterState * PyLongObject * PyMemberDef * PyMethodDef * PyModuleDef * PyObject * PyThreadState * PyTypeObject
itamaro
added a commit
to itamaro/cpython
that referenced
this pull request
May 24, 2022
pythonGH-31527 moved this typedef to `Include/pytypedefs.h`, so this comment should point at the correct location
vstinner
pushed a commit
that referenced
this pull request
Jul 9, 2022
GH-31527 moved this typedef to `Include/pytypedefs.h`, so this comment should point at the correct location
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Move forward declarations of Python C API types to a new pytypedefs.h
header file to solve interdependency issues between header files.
pytypedefs.h contains forward declarations of the following types:
https://bugs.python.org/issue45459