File tree Expand file tree Collapse file tree 2 files changed +19
-14
lines changed
Expand file tree Collapse file tree 2 files changed +19
-14
lines changed Original file line number Diff line number Diff line change @@ -250,18 +250,32 @@ Unless using :pep:`523`, you will not need this.
250250 .. versionadded :: 3.12
251251
252252
253- .. c :enum :: PyUnstable_ExecutableKinds
253+ .. c :var :: PyUnstable_ExecutableKinds
254254
255- An enumeration of the different kinds of executables (code objects) in a frame.
256- This can be one of the constants :c:macro:`PyUnstable_EXECUTABLE_KIND_SKIP`
257- or :c:macro:`PyUnstable_EXECUTABLE_KIND_PY_FUNCTION`.
255+ An array of executable kinds (executor types) for frames, used for internal
256+ debugging and tracing.
257+
258+ Tools like debuggers and profilers can use this to identify the type of execution
259+ context associated with a frame (e.g. to filter out internal frames).
260+ The entries are indexed by the following constants:
261+
262+ .. list-table::
263+ :header-rows: 1
264+ :widths: auto
265+
266+ * - Constant
267+ - Description
268+ * - :c:macro:`PyUnstable_EXECUTABLE_KIND_SKIP`
269+ - The frame is internal (e.g. inlined) and should be skipped by tools.
270+ * - :c:macro:`PyUnstable_EXECUTABLE_KIND_PY_FUNCTION`
271+ - The frame corresponds to a standard Python function.
258272
259273 .. versionadded:: 3.13
260274
261275
262276.. c:macro:: PyUnstable_EXECUTABLE_KIND_SKIP
263277
264- Index for the "skip" kind in `` PyUnstable_ExecutableKinds` `.
278+ Index for the "skip" kind in :c:data:` PyUnstable_ExecutableKinds`.
265279 Indicates that the frame's code object should be skipped.
266280
267281 .. versionadded:: 3.13
@@ -293,6 +307,3 @@ Unless using :pep:`523`, you will not need this.
293307 The number of entries in ``PyUnstable_ExecutableKinds``.
294308
295309 .. versionadded:: 3.13
296-
297-
298-
Original file line number Diff line number Diff line change @@ -80,12 +80,6 @@ PyLong_MASK
8080PyLong_SHIFT
8181# cpython/pyerrors.h
8282PyException_HEAD
83- # cpython/pyframe.h
84- PyUnstable_EXECUTABLE_KINDS
85- PyUnstable_EXECUTABLE_KIND_BUILTIN_FUNCTION
86- PyUnstable_EXECUTABLE_KIND_METHOD_DESCRIPTOR
87- PyUnstable_EXECUTABLE_KIND_PY_FUNCTION
88- PyUnstable_EXECUTABLE_KIND_SKIP
8983# cpython/pylifecycle.h
9084Py_FrozenMain
9185# cpython/unicodeobject.h
You can’t perform that action at this time.
0 commit comments