summaryrefslogtreecommitdiffstats
path: root/Include/internal/pycore_runtime.h
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-08-24 15:40:56 (GMT)
committerGitHub <noreply@github.com>2023-08-24 15:40:56 (GMT)
commitf1ae706ca53d43890cf09ccf052d783e97ba4b28 (patch)
treed4f8bdd2462bd3091674c068f53ef456e368d2a2 /Include/internal/pycore_runtime.h
parent52c6a6e48a5fa12af401810722cfcad859e9881a (diff)
downloadcpython-f1ae706ca53d43890cf09ccf052d783e97ba4b28.zip
cpython-f1ae706ca53d43890cf09ccf052d783e97ba4b28.tar.gz
cpython-f1ae706ca53d43890cf09ccf052d783e97ba4b28.tar.bz2
gh-107211: No longer export internal functions (7) (#108425)
No longer export _PyUnicode_FromId() internal C API function. Change comment style to "// comment" and add comment explaining why other functions have to be exported. Update Tools/build/generate_token.py to update Include/internal/pycore_token.h comments.
Diffstat (limited to 'Include/internal/pycore_runtime.h')
-rw-r--r--Include/internal/pycore_runtime.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Include/internal/pycore_runtime.h b/Include/internal/pycore_runtime.h
index 4a46080..2ce46f3 100644
--- a/Include/internal/pycore_runtime.h
+++ b/Include/internal/pycore_runtime.h
@@ -272,6 +272,9 @@ typedef struct pyruntimestate {
/* other API */
+// Export _PyRuntime for shared extensions which use it in static inline
+// functions for best performance, like _Py_IsMainThread() or _Py_ID().
+// It's also made accessible for debuggers and profilers.
PyAPI_DATA(_PyRuntimeState) _PyRuntime;
extern PyStatus _PyRuntimeState_Init(_PyRuntimeState *runtime);