Mercurial > cpython-lru_cache-weakref
diff Python/ceval.c @ 35125:cdec978b916c legacy-trunk
Add comments about PyThreadState and the usage of its fields.
| author | Brett Cannon <bcannon@gmail.com> |
|---|---|
| date | Sat, 25 Jun 2005 07:07:35 +0000 |
| parents | 71fd7ee4b7f5 |
| children | 70681267a74a |
line wrap: on
line diff
--- a/Python/ceval.c Fri Jun 24 19:46:53 2005 +0000 +++ b/Python/ceval.c Sat Jun 25 07:07:35 2005 +0000 @@ -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)); }
