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.
This commit is contained in:
Victor Stinner 2019-11-22 18:52:27 +01:00 committed by GitHub
parent 42bc60ead3
commit 82c83bd907
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 70 additions and 46 deletions

View file

@ -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