Eric Snow <[email protected]> added the comment:
Curse you, undocumented API that we have to support! It could still wrap a
simple get() on sys.modules, roughly like this:
PyObject*
PyState_FindModule(struct PyModuleDef* m)
{
PyObject* modules, module;
modules = PyImport_GetModuleDict();
if (modules == NULL)
return NULL;
module = PyDict_GetItemString(sys_modules, m->m_name);
return module==Py_None ? NULL : module;
}
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue14615>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com