[Python-checkins] python/dist/src/Python ceval.c,2.422,2.423

bcannon@users.sourceforge.net bcannon at users.sourceforge.net
Sat Jun 25 09:07:38 CEST 2005


Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31041/Python

Modified Files:
	ceval.c 
Log Message:
Add comments about PyThreadState and the usage of its fields.


Index: ceval.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v
retrieving revision 2.422
retrieving revision 2.423
diff -u -d -r2.422 -r2.423
--- ceval.c	4 Apr 2005 15:49:02 -0000	2.422
+++ ceval.c	25 Jun 2005 07:07:35 -0000	2.423
@@ -3284,10 +3284,12 @@
 	Py_XINCREF(arg);
 	tstate->c_profilefunc = NULL;
 	tstate->c_profileobj = NULL;
+	/* Must make sure that tracing is not ignored if 'temp' is freed */
 	tstate->use_tracing = tstate->c_tracefunc != NULL;
 	Py_XDECREF(temp);
 	tstate->c_profilefunc = func;
 	tstate->c_profileobj = arg;
+	/* Flag that tracing or profiling is turned on */
 	tstate->use_tracing = (func != NULL) || (tstate->c_tracefunc != NULL);
 }
 
@@ -3299,10 +3301,12 @@
 	Py_XINCREF(arg);
 	tstate->c_tracefunc = NULL;
 	tstate->c_traceobj = NULL;
+	/* Must make sure that profiling is not ignored if 'temp' is freed */
 	tstate->use_tracing = tstate->c_profilefunc != NULL;
 	Py_XDECREF(temp);
 	tstate->c_tracefunc = func;
 	tstate->c_traceobj = arg;
+	/* Flag that tracing or profiling is turned on */
 	tstate->use_tracing = ((func != NULL)
 			       || (tstate->c_profilefunc != NULL));
 }



More information about the Python-checkins mailing list