Issue #15610: The PyImport_ImportModuleEx macro now calls

PyImport_ImportModuleLevel() with a 'level' of 0 instead of -1 as the
latter is no longer a valid value.

Also added a versionchanged note for PyImport_ImportModuleLevel() just
in case people don't make the connection between changes to
__import__() and this C function.
This commit is contained in:
Brett Cannon 2012-08-10 18:55:08 -04:00
parent f410ce8c09
commit 522267e784
4 changed files with 13 additions and 3 deletions

View file

@ -62,7 +62,7 @@ PyAPI_FUNC(PyObject *) PyImport_ImportModuleLevelObject(
);
#define PyImport_ImportModuleEx(n, g, l, f) \
PyImport_ImportModuleLevel(n, g, l, f, -1)
PyImport_ImportModuleLevel(n, g, l, f, 0)
PyAPI_FUNC(PyObject *) PyImport_GetImporter(PyObject *path);
PyAPI_FUNC(PyObject *) PyImport_Import(PyObject *name);