[Python-checkins] CVS: python/dist/src/Python sysmodule.c,2.85,2.85.2.1

Anthony Baxter anthonybaxter@users.sourceforge.net
Tue, 20 Nov 2001 19:51:22 -0800


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

Modified Files:
      Tag: release21-maint
	sysmodule.c 
Log Message:
backport of 2.90:
Patch number #422106 by Greg Ball, to fix segmentation
fault in sys.displayhook.



Index: sysmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/sysmodule.c,v
retrieving revision 2.85
retrieving revision 2.85.2.1
diff -C2 -d -r2.85 -r2.85.2.1
*** sysmodule.c	2001/04/10 22:07:43	2.85
--- sysmodule.c	2001/11/21 03:51:20	2.85.2.1
***************
*** 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))