File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments