[Python-checkins] python/dist/src/Python pythonrun.c,2.192,2.193

mhammond@users.sourceforge.net mhammond@users.sourceforge.net
Tue, 22 Apr 2003 04:18:03 -0700


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

Modified Files:
	pythonrun.c 
Log Message:
PyGILState cleanup was too early - destructors called via module cleanup may use the API.

Index: pythonrun.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/pythonrun.c,v
retrieving revision 2.192
retrieving revision 2.193
diff -C2 -d -r2.192 -r2.193
*** pythonrun.c	19 Apr 2003 18:47:02 -0000	2.192
--- pythonrun.c	22 Apr 2003 11:18:00 -0000	2.193
***************
*** 255,263 ****
  	initialized = 0;
  
- 	/* Cleanup auto-thread-state */
- #ifdef WITH_THREAD
- 	_PyGILState_Fini();
- #endif /* WITH_THREAD */
- 
  	/* Get current thread state and interpreter pointer */
  	tstate = PyThreadState_Get();
--- 255,258 ----
***************
*** 310,313 ****
--- 305,313 ----
  	*/
  	_PyExc_Fini();
+ 
+ 	/* Cleanup auto-thread-state */
+ #ifdef WITH_THREAD
+ 	_PyGILState_Fini();
+ #endif /* WITH_THREAD */
  
  	/* Clear interpreter state */