Skip to content

Commit 21cad67

Browse files
committed
pythongh-107149: Make PyUnstable_ExecutableKinds public
Move PyUnstable_ExecutableKinds and associated macros from the internal C API to the public C API.
1 parent aa6f787 commit 21cad67

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Include/cpython/pyframe.h

+8
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,11 @@ PyAPI_FUNC(int) PyUnstable_InterpreterFrame_GetLasti(struct _PyInterpreterFrame
3333
/* Returns the currently executing line number, or -1 if there is no line number.
3434
* Does not raise an exception. */
3535
PyAPI_FUNC(int) PyUnstable_InterpreterFrame_GetLine(struct _PyInterpreterFrame *frame);
36+
37+
#define PY_EXECUTABLE_KIND_SKIP 0
38+
#define PY_EXECUTABLE_KIND_PY_FUNCTION 1
39+
#define PY_EXECUTABLE_KIND_BUILTIN_FUNCTION 3
40+
#define PY_EXECUTABLE_KIND_METHOD_DESCRIPTOR 4
41+
#define PY_EXECUTABLE_KINDS 5
42+
43+
PyAPI_DATA(const PyTypeObject *) const PyUnstable_ExecutableKinds[PY_EXECUTABLE_KINDS+1];

Include/internal/pycore_frame.h

-8
Original file line numberDiff line numberDiff line change
@@ -311,14 +311,6 @@ PyGenObject *_PyFrame_GetGenerator(_PyInterpreterFrame *frame)
311311
return (PyGenObject *)(((char *)frame) - offset_in_gen);
312312
}
313313

314-
#define PY_EXECUTABLE_KIND_SKIP 0
315-
#define PY_EXECUTABLE_KIND_PY_FUNCTION 1
316-
#define PY_EXECUTABLE_KIND_BUILTIN_FUNCTION 3
317-
#define PY_EXECUTABLE_KIND_METHOD_DESCRIPTOR 4
318-
#define PY_EXECUTABLE_KINDS 5
319-
320-
PyAPI_DATA(const PyTypeObject *) const PyUnstable_ExecutableKinds[PY_EXECUTABLE_KINDS+1];
321-
322314
#ifdef __cplusplus
323315
}
324316
#endif

0 commit comments

Comments
 (0)