[Python-checkins] python/dist/src/Python importdl.c,2.70,2.71
loewis at users.sourceforge.net
loewis at users.sourceforge.net
Thu Sep 4 12:46:02 EDT 2003
Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1:/tmp/cvs-serv2698/Python
Modified Files:
importdl.c
Log Message:
Patch #794826: Add __file__ in dynamically loaded modules for multiple
interpreters. Fixes #698282. Will backport to 2.3.
Index: importdl.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/importdl.c,v
retrieving revision 2.70
retrieving revision 2.71
diff -C2 -d -r2.70 -r2.71
*** importdl.c 26 Aug 2002 21:15:11 -0000 2.70
--- importdl.c 4 Sep 2003 18:45:59 -0000 2.71
***************
*** 55,60 ****
if (PyErr_Occurred())
return NULL;
- if (_PyImport_FixupExtension(name, pathname) == NULL)
- return NULL;
m = PyDict_GetItemString(PyImport_GetModuleDict(), name);
--- 55,58 ----
***************
*** 67,70 ****
--- 65,71 ----
if (PyModule_AddStringConstant(m, "__file__", pathname) < 0)
PyErr_Clear(); /* Not important enough to report */
+
+ if (_PyImport_FixupExtension(name, pathname) == NULL)
+ return NULL;
if (Py_VerboseFlag)
PySys_WriteStderr(
More information about the Python-checkins
mailing list