diff options
Diffstat (limited to 'Python/import.c')
-rw-r--r-- | Python/import.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Python/import.c b/Python/import.c index 400b02a..0e2e7c3 100644 --- a/Python/import.c +++ b/Python/import.c @@ -1978,23 +1978,23 @@ PyImport_ImportModuleLevel(const char *name, PyObject *globals, PyObject *locals PyObject * PyImport_ReloadModule(PyObject *m) { - _Py_IDENTIFIER(imp); + _Py_IDENTIFIER(importlib); _Py_IDENTIFIER(reload); PyObject *reloaded_module = NULL; - PyObject *imp = _PyImport_GetModuleId(&PyId_imp); - if (imp == NULL) { + PyObject *importlib = _PyImport_GetModuleId(&PyId_importlib); + if (importlib == NULL) { if (PyErr_Occurred()) { return NULL; } - imp = PyImport_ImportModule("imp"); - if (imp == NULL) { + importlib = PyImport_ImportModule("importlib"); + if (importlib == NULL) { return NULL; } } - reloaded_module = _PyObject_CallMethodIdOneArg(imp, &PyId_reload, m); - Py_DECREF(imp); + reloaded_module = _PyObject_CallMethodIdOneArg(importlib, &PyId_reload, m); + Py_DECREF(importlib); return reloaded_module; } |