[Python-checkins] CVS: python/dist/src/Python sysmodule.c,2.89,2.90

Moshe Zadka moshez@users.sourceforge.net
2001年7月23日 06:32:46 -0700


Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv10188/Python
Modified Files:
	sysmodule.c 
Log Message:
Patch number #422106 by Greg Ball, to fix segmentation
fault in sys.displayhook.
Please check this in on the 2.2a1 branch (or whatever is necessary
to get it working next release)
Index: sysmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/sysmodule.c,v
retrieving revision 2.89
retrieving revision 2.90
diff -C2 -r2.89 -r2.90
*** sysmodule.c	2001年07月18日 16:17:16	2.89
--- sysmodule.c	2001年07月23日 13:32:43	2.90
***************
*** 76,79 ****
--- 76,84 ----
 	PyObject *builtins = PyDict_GetItemString(modules, "__builtin__");
 
+ 	if (builtins == NULL) {
+ 		PyErr_SetString(PyExc_RuntimeError, "lost __builtin__");
+ 		return NULL;
+ 	}
+ 
 	/* parse arguments */
 	if (!PyArg_ParseTuple(args, "O:displayhook", &o))

AltStyle によって変換されたページ (->オリジナル) /