diff options
author | Dong-hee Na <donghee.na92@gmail.com> | 2020-04-14 16:16:24 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-14 16:16:24 (GMT) |
commit | 62f75fe3dd138f72303814d27183aa469eefcca6 (patch) | |
tree | 9d9a3dc0356561974b26f17b65a0a0da18f4ad4d /Include/internal | |
parent | e5014be0497d06d78343623588a80f491a6f7b74 (diff) | |
download | cpython-62f75fe3dd138f72303814d27183aa469eefcca6.zip cpython-62f75fe3dd138f72303814d27183aa469eefcca6.tar.gz cpython-62f75fe3dd138f72303814d27183aa469eefcca6.tar.bz2 |
bpo-40232: Update PyOS_AfterFork_Child() to use _PyThread_at_fork_reinit() (GH-19450)
Diffstat (limited to 'Include/internal')
-rw-r--r-- | Include/internal/pycore_ceval.h | 5 | ||||
-rw-r--r-- | Include/internal/pycore_import.h | 2 | ||||
-rw-r--r-- | Include/internal/pycore_runtime.h | 3 |
3 files changed, 7 insertions, 3 deletions
diff --git a/Include/internal/pycore_ceval.h b/Include/internal/pycore_ceval.h index 298018a..050dd59 100644 --- a/Include/internal/pycore_ceval.h +++ b/Include/internal/pycore_ceval.h @@ -25,8 +25,9 @@ PyAPI_FUNC(int) _PyEval_AddPendingCall( int (*func)(void *), void *arg); PyAPI_FUNC(void) _PyEval_SignalAsyncExc(PyThreadState *tstate); -PyAPI_FUNC(void) _PyEval_ReInitThreads( - struct pyruntimestate *runtime); +#ifdef HAVE_FORK +extern void _PyEval_ReInitThreads(struct pyruntimestate *runtime); +#endif PyAPI_FUNC(void) _PyEval_SetCoroutineOriginTrackingDepth( PyThreadState *tstate, int new_depth); diff --git a/Include/internal/pycore_import.h b/Include/internal/pycore_import.h index 5d3203e..b011ea4 100644 --- a/Include/internal/pycore_import.h +++ b/Include/internal/pycore_import.h @@ -10,7 +10,9 @@ PyAPI_FUNC(PyObject *) _PyImport_FindBuiltin( const char *name /* UTF-8 encoded string */ ); +#ifdef HAVE_FORK extern void _PyImport_ReInitLock(void); +#endif extern void _PyImport_Cleanup(PyThreadState *tstate); #ifdef __cplusplus diff --git a/Include/internal/pycore_runtime.h b/Include/internal/pycore_runtime.h index 54dbaeb..995fe23 100644 --- a/Include/internal/pycore_runtime.h +++ b/Include/internal/pycore_runtime.h @@ -117,8 +117,9 @@ PyAPI_DATA(_PyRuntimeState) _PyRuntime; PyAPI_FUNC(PyStatus) _PyRuntimeState_Init(_PyRuntimeState *runtime); PyAPI_FUNC(void) _PyRuntimeState_Fini(_PyRuntimeState *runtime); +#ifdef HAVE_FORK PyAPI_FUNC(void) _PyRuntimeState_ReInitThreads(_PyRuntimeState *runtime); - +#endif /* Initialize _PyRuntimeState. Return NULL on success, or return an error message on failure. */ |