Skip to content

Commit 927383b

Browse files
committed
fix 5 pyframe
1 parent a0b1951 commit 927383b

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

Doc/c-api/frame.rst

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -265,20 +265,23 @@ Unless using :pep:`523`, you will not need this.
265265
266266
* - Constant
267267
- Description
268-
* - :c:macro:`PyUnstable_EXECUTABLE_KIND_SKIP`
268+
* - .. c:macro:: PyUnstable_EXECUTABLE_KIND_SKIP
269269
- The frame is internal (e.g. inlined) and should be skipped by tools.
270-
* - :c:macro:`PyUnstable_EXECUTABLE_KIND_PY_FUNCTION`
270+
* - .. c:macro:: PyUnstable_EXECUTABLE_KIND_PY_FUNCTION
271271
- The frame corresponds to a standard Python function.
272272
273273
.. versionadded:: 3.13
274274
275+
Example usage:
275276
276-
.. c:macro:: PyUnstable_EXECUTABLE_KIND_SKIP
277+
.. code-block:: c
277278
278-
Index for the "skip" kind in :c:data:`PyUnstable_ExecutableKinds`.
279-
Indicates that the frame's code object should be skipped.
280-
281-
.. versionadded:: 3.13
279+
// Check if a frame should be skipped
280+
if (kind == PyUnstable_EXECUTABLE_KIND_SKIP) {
281+
// This is an internal frame (like a Tier 2 optimizer frame)
282+
// Tools should ignore it.
283+
continue;
284+
}
282285
283286
284287
.. c:macro:: PyUnstable_EXECUTABLE_KIND_PY_FUNCTION

0 commit comments

Comments
 (0)