diff options
author | Victor Stinner <vstinner@python.org> | 2019-11-22 17:52:27 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-22 17:52:27 (GMT) |
commit | 82c83bd907409c287a5bd0d0f4598f2c0538f34d (patch) | |
tree | 0f7b4dcc1221e93cf9ad8fd704c5cf90e4dac11a /Include/internal/pycore_pystate.h | |
parent | 42bc60ead39c7be9f6bb7329977826e962f601eb (diff) | |
download | cpython-82c83bd907409c287a5bd0d0f4598f2c0538f34d.zip cpython-82c83bd907409c287a5bd0d0f4598f2c0538f34d.tar.gz cpython-82c83bd907409c287a5bd0d0f4598f2c0538f34d.tar.bz2 |
bpo-38858: _PyImport_FixupExtensionObject() handles subinterpreters (GH-17350)
If _PyImport_FixupExtensionObject() is called from a subinterpreter,
leave extensions unchanged and don't copy the module dictionary
into def->m_base.m_copy.
Diffstat (limited to 'Include/internal/pycore_pystate.h')
-rw-r--r-- | Include/internal/pycore_pystate.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Include/internal/pycore_pystate.h b/Include/internal/pycore_pystate.h index 936e9cb..aa2103f 100644 --- a/Include/internal/pycore_pystate.h +++ b/Include/internal/pycore_pystate.h @@ -324,6 +324,12 @@ extern void _PyInterpreterState_ClearModules(PyInterpreterState *interp); PyAPI_FUNC(void) _PyGILState_Reinit(_PyRuntimeState *runtime); + +PyAPI_FUNC(int) _PyState_AddModule( + PyThreadState *tstate, + PyObject* module, + struct PyModuleDef* def); + #ifdef __cplusplus } #endif |