[Python-checkins] python/dist/src/Python importdl.c,2.70,2.70.14.1

loewis at users.sourceforge.net loewis at users.sourceforge.net
Thu Sep 4 12:46:41 EDT 2003


Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1:/tmp/cvs-serv2966/Python

Modified Files:
      Tag: release23-maint
	importdl.c 
Log Message:
Patch #794826: Add __file__ in dynamically loaded modules for multiple
interpreters. Fixes #698282.


Index: importdl.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/importdl.c,v
retrieving revision 2.70
retrieving revision 2.70.14.1
diff -C2 -d -r2.70 -r2.70.14.1
*** importdl.c	26 Aug 2002 21:15:11 -0000	2.70
--- importdl.c	4 Sep 2003 18:46:39 -0000	2.70.14.1
***************
*** 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