[Python-checkins] CVS: python/dist/src/Python sysmodule.c,2.82,2.83

Guido van Rossum python-dev@python.org
Sat, 13 Jan 2001 14:06:07 -0800


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

Modified Files:
	sysmodule.c 
Log Message:
Neil discovered a bad DECREF on warnoptions, that caused repeated
re-initializing Python (Py_Finalize() followed by Py_Initialize()) to
blow up quickly.  With the DECREF removed I can't get it to fail any
more.  (Except it still leaks, but that's probably a separate issue.)


Index: sysmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/sysmodule.c,v
retrieving revision 2.82
retrieving revision 2.83
diff -C2 -r2.82 -r2.83
*** sysmodule.c	2001/01/11 09:27:34	2.82
--- sysmodule.c	2001/01/13 22:06:05	2.83
***************
*** 635,640 ****
  	}
  	if (warnoptions != NULL) {
! 		PyDict_SetItemString(sysdict, "warnoptions", v = warnoptions);
! 		Py_DECREF(v);
  	}
  	
--- 635,639 ----
  	}
  	if (warnoptions != NULL) {
! 		PyDict_SetItemString(sysdict, "warnoptions", warnoptions);
  	}