Issue #3080: Add PyImport_ImportModuleLevelObject() function

Use it for the builtin __import__ function.
This commit is contained in:
Victor Stinner 2011-03-14 15:54:52 -04:00
parent 98dbba5d20
commit fe93faf98c
4 changed files with 41 additions and 18 deletions

View file

@ -50,6 +50,13 @@ PyAPI_FUNC(PyObject *) PyImport_ImportModuleLevel(
PyObject *fromlist,
int level
);
PyAPI_FUNC(PyObject *) PyImport_ImportModuleLevelObject(
PyObject *name,
PyObject *globals,
PyObject *locals,
PyObject *fromlist,
int level
);
#define PyImport_ImportModuleEx(n, g, l, f) \
PyImport_ImportModuleLevel(n, g, l, f, -1)