-
-
Notifications
You must be signed in to change notification settings - Fork 34.5k
gh-141004: Document unstable executable kind macros in pyframe.h
#143490
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?
Changes from 1 commit
1efbe41
4572008
54495a2
e8097b1
9c1492f
a0b1951
927383b
e51340a
3fafd77
45e9a6d
43e9c9f
efe7161
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -265,20 +265,23 @@ Unless using :pep:`523`, you will not need this. | |
|
|
||
| * - Constant | ||
| - Description | ||
| * - :c:macro:`PyUnstable_EXECUTABLE_KIND_SKIP` | ||
| * - .. c:macro:: PyUnstable_EXECUTABLE_KIND_SKIP | ||
| - The frame is internal (e.g. inlined) and should be skipped by tools. | ||
| * - :c:macro:`PyUnstable_EXECUTABLE_KIND_PY_FUNCTION` | ||
| * - .. c:macro:: PyUnstable_EXECUTABLE_KIND_PY_FUNCTION | ||
| - The frame corresponds to a standard Python function. | ||
|
|
||
| .. versionadded:: 3.13 | ||
|
|
||
| Example usage: | ||
|
|
||
| .. c:macro:: PyUnstable_EXECUTABLE_KIND_SKIP | ||
| .. code-block:: c | ||
|
|
||
| Index for the "skip" kind in :c:data:`PyUnstable_ExecutableKinds`. | ||
| Indicates that the frame's code object should be skipped. | ||
|
|
||
| .. versionadded:: 3.13 | ||
| // Check if a frame should be skipped | ||
| if (kind == PyUnstable_EXECUTABLE_KIND_SKIP) { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @encukou kind here refers to the executable kind field stored in the frame's executor (e.g. _PyFrame_GetExecutableKind(frame))
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, explicitly show your |
||
| // This is an internal frame (like a Tier 2 optimizer frame) | ||
| // Tools should ignore it. | ||
| continue; | ||
| } | ||
|
|
||
|
|
||
| .. c:macro:: PyUnstable_EXECUTABLE_KIND_PY_FUNCTION | ||
|
|
||
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
.. versionadded:: ...should be the last thing in a function's/macro's/type's/etc. doc, please move it after the example.