-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
gh-141518: Add PyUnstable_InterpreterFrame_GetFrameObject() function #141950
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
base: main
Are you sure you want to change the base?
Conversation
…ction Add also PyUnstable_InterpreterFrame type.
|
See #141665 (review) for the rationale on adding this function. |
| The interpreter's internal frame representation. | ||
| The structure is intentionally opaque and there are currently no plans to |
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.
| The structure is intentionally opaque and there are currently no plans to | |
| The structure is intentionally opaque, and there are currently no plans to |
| PyAPI_FUNC(int) PyUnstable_InterpreterFrame_GetLine(struct _PyInterpreterFrame *frame); | ||
| PyAPI_FUNC(int) PyUnstable_InterpreterFrame_GetLine( | ||
| PyUnstable_InterpreterFrame *frame); | ||
|
|
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.
Maybe it'll be better to add inline comment from docs?
| @@ -0,0 +1,2 @@ | |||
| Add :c:func:`PyUnstable_InterpreterFrame_GetFrameObject` to get a frame | |||
| object from an interpreter frame. Patch by Victor Stinner. | |||
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.
Should we mention renaming of _PyInterpreterFrame into PyUnstable_InterpreterFrame?
And in the whatsnew file.
| return frame_generator_get((PyObject *)frame, NULL); | ||
| } | ||
|
|
||
|
|
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.
Adding two blank lines is intentional, right?
Add also PyUnstable_InterpreterFrame type.
PyUnstable_InterpreterState_SetEvalFrameFunc()#141518📚 Documentation preview 📚: https://cpython-previews--141950.org.readthedocs.build/