summaryrefslogtreecommitdiffstats
path: root/Include/internal
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2024-03-21 16:06:35 (GMT)
committerGitHub <noreply@github.com>2024-03-21 16:06:35 (GMT)
commit5a76d1be8ef371b75ca65166726923c249b5f615 (patch)
tree80a5b914c708d1ddce4da029b85e9d8c562ed0ee /Include/internal
parentbbee57fa8c318cb26d6c8651254927a1972c9738 (diff)
downloadcpython-5a76d1be8ef371b75ca65166726923c249b5f615.zip
cpython-5a76d1be8ef371b75ca65166726923c249b5f615.tar.gz
cpython-5a76d1be8ef371b75ca65166726923c249b5f615.tar.bz2
gh-105716: Update interp->threads.main After Fork (gh-117049)
I missed this in gh-109921. We also update Py_Exit() to call _PyInterpreterState_SetNotRunningMain(), if necessary.
Diffstat (limited to 'Include/internal')
-rw-r--r--Include/internal/pycore_pystate.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Include/internal/pycore_pystate.h b/Include/internal/pycore_pystate.h
index 6f9e6a3..9aa4392 100644
--- a/Include/internal/pycore_pystate.h
+++ b/Include/internal/pycore_pystate.h
@@ -83,6 +83,9 @@ PyAPI_FUNC(void) _PyInterpreterState_SetNotRunningMain(PyInterpreterState *);
PyAPI_FUNC(int) _PyInterpreterState_IsRunningMain(PyInterpreterState *);
PyAPI_FUNC(int) _PyInterpreterState_FailIfRunningMain(PyInterpreterState *);
+extern int _PyThreadState_IsRunningMain(PyThreadState *);
+extern void _PyInterpreterState_ReinitRunningMain(PyThreadState *);
+
static inline const PyConfig *
_Py_GetMainConfig(void)