diff options
| author | Guido van Rossum <guido@python.org> | 2002-01-15 21:14:38 (GMT) |
|---|---|---|
| committer | Guido van Rossum <guido@python.org> | 2002-01-15 21:14:38 (GMT) |
| commit | a472771dadd1e17a019f5effc8877ba20d914c56 (patch) | |
| tree | 6a104975500c97fea39a1bee05c4cbb25c311cba /Mac/Contrib/PythonDetector/OpenPythonLib | |
| parent | e60d3737ded2ec70bc291cd1cae5b5890866b6bd (diff) | |
| download | cpython-a472771dadd1e17a019f5effc8877ba20d914c56.zip cpython-a472771dadd1e17a019f5effc8877ba20d914c56.tar.gz cpython-a472771dadd1e17a019f5effc8877ba20d914c56.tar.bz2 | |
Backport revision 2.69.
SF patch #471839: Bug when extensions import extensions (Shane Hathaway)
When an extension imports another extension in its
initXXX() function, the variable _Py_PackageContext is
prematurely reset to NULL. If the outer extension then
calls Py_InitModule(), the extension is installed in
sys.modules without its package name. The
manifestation of this bug is a "SystemError:
_PyImport_FixupExtension: module <package>.<extension>
not loaded".
To fix this, importdl.c just needs to retain the old
value of _Py_PackageContext and restore it after the
initXXX() method is called. The attached patch does this.
This patch applies to Python 2.1.1 and the current CVS.
Diffstat (limited to 'Mac/Contrib/PythonDetector/OpenPythonLib')
0 files changed, 0 insertions, 0 deletions
