From 86b7afdfeee77993fe896a2aa13b3f4f95973f16 Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Mon, 4 Sep 2017 17:54:09 -0600 Subject: bpo-28411: Remove "modules" field from Py_InterpreterState. (#1638) sys.modules is the one true source. --- Python/importdl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Python/importdl.c') diff --git a/Python/importdl.c b/Python/importdl.c index d8656b9433..32fb7e1be2 100644 --- a/Python/importdl.c +++ b/Python/importdl.c @@ -215,7 +215,8 @@ _PyImport_LoadDynamicModuleWithSpec(PyObject *spec, FILE *fp) else Py_INCREF(path); - if (_PyImport_FixupExtensionObject(m, name_unicode, path) < 0) + PyObject *modules = PyImport_GetModuleDict(); + if (_PyImport_FixupExtensionObject(m, name_unicode, path, modules) < 0) goto error; Py_DECREF(name_unicode); -- cgit v1.2.1