mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
bpo-36710: PyOS_AfterFork_Child() pass runtime parameter (GH-12936)
The PyOS_AfterFork_Child() function now pass a 'runtime' parameter to subfunctions. * Fix _PyRuntimeState_ReInitThreads(): use the correct memory allocator * Add runtime parameter to _PyRuntimeState_ReInitThreads(), _PyGILState_Reinit() and _PyInterpreterState_DeleteExceptMain() * Move _PyGILState_Reinit() to the internal C API.
This commit is contained in:
parent
8bb3230149
commit
b930a2d2b1
4 changed files with 43 additions and 42 deletions
|
@ -185,9 +185,9 @@ typedef struct pyruntimestate {
|
|||
/* Note: _PyRuntimeState_INIT sets other fields to 0/NULL */
|
||||
|
||||
PyAPI_DATA(_PyRuntimeState) _PyRuntime;
|
||||
PyAPI_FUNC(_PyInitError) _PyRuntimeState_Init(_PyRuntimeState *);
|
||||
PyAPI_FUNC(void) _PyRuntimeState_Fini(_PyRuntimeState *);
|
||||
PyAPI_FUNC(void) _PyRuntimeState_ReInitThreads(void);
|
||||
PyAPI_FUNC(_PyInitError) _PyRuntimeState_Init(_PyRuntimeState *runtime);
|
||||
PyAPI_FUNC(void) _PyRuntimeState_Fini(_PyRuntimeState *runtime);
|
||||
PyAPI_FUNC(void) _PyRuntimeState_ReInitThreads(_PyRuntimeState *runtime);
|
||||
|
||||
/* Initialize _PyRuntimeState.
|
||||
Return NULL on success, or return an error message on failure. */
|
||||
|
@ -236,8 +236,10 @@ PyAPI_FUNC(void) _PyThreadState_Init(
|
|||
PyThreadState *tstate);
|
||||
PyAPI_FUNC(void) _PyThreadState_DeleteExcept(PyThreadState *tstate);
|
||||
|
||||
PyAPI_FUNC(_PyInitError) _PyInterpreterState_Enable(_PyRuntimeState *);
|
||||
PyAPI_FUNC(void) _PyInterpreterState_DeleteExceptMain(void);
|
||||
PyAPI_FUNC(_PyInitError) _PyInterpreterState_Enable(_PyRuntimeState *runtime);
|
||||
PyAPI_FUNC(void) _PyInterpreterState_DeleteExceptMain(_PyRuntimeState *runtime);
|
||||
|
||||
PyAPI_FUNC(void) _PyGILState_Reinit(_PyRuntimeState *runtime);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue