summaryrefslogtreecommitdiffstats
path: root/Include/cpython
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-08-31 07:56:06 (GMT)
committerGitHub <noreply@github.com>2023-08-31 07:56:06 (GMT)
commit9c03215a3ee31462045b2c2ee162bdda30c54572 (patch)
tree364dcf221c1d01095b1bd2d1e5ecc1357830137b /Include/cpython
parentb89b838ebc817e5fbffad1ad8e1a85aa2d9f3113 (diff)
downloadcpython-9c03215a3ee31462045b2c2ee162bdda30c54572.zip
cpython-9c03215a3ee31462045b2c2ee162bdda30c54572.tar.gz
cpython-9c03215a3ee31462045b2c2ee162bdda30c54572.tar.bz2
gh-107149: Make PyUnstable_ExecutableKinds public (#108440)
Move PyUnstable_ExecutableKinds and associated macros from the internal C API to the public C API. Rename constants: replace "PY_" prefix with "PyUnstable_" prefix.
Diffstat (limited to 'Include/cpython')
-rw-r--r--Include/cpython/pyframe.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/Include/cpython/pyframe.h b/Include/cpython/pyframe.h
index 0e2afff..c5adbbe 100644
--- a/Include/cpython/pyframe.h
+++ b/Include/cpython/pyframe.h
@@ -33,3 +33,11 @@ PyAPI_FUNC(int) PyUnstable_InterpreterFrame_GetLasti(struct _PyInterpreterFrame
/* Returns the currently executing line number, or -1 if there is no line number.
* Does not raise an exception. */
PyAPI_FUNC(int) PyUnstable_InterpreterFrame_GetLine(struct _PyInterpreterFrame *frame);
+
+#define PyUnstable_EXECUTABLE_KIND_SKIP 0
+#define PyUnstable_EXECUTABLE_KIND_PY_FUNCTION 1
+#define PyUnstable_EXECUTABLE_KIND_BUILTIN_FUNCTION 3
+#define PyUnstable_EXECUTABLE_KIND_METHOD_DESCRIPTOR 4
+#define PyUnstable_EXECUTABLE_KINDS 5
+
+PyAPI_DATA(const PyTypeObject *) const PyUnstable_ExecutableKinds[PyUnstable_EXECUTABLE_KINDS+1];