summaryrefslogtreecommitdiffstats
path: root/Include/pystate.h
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2005-06-25 07:07:35 (GMT)
committerBrett Cannon <bcannon@gmail.com>2005-06-25 07:07:35 (GMT)
commit55fa66dd45e76a57deca8cebaedf1a624499648b (patch)
treef25a0a1b1939d8b0b2033e932411e3bac05155cd /Include/pystate.h
parent527c46996f3c78124c6c7691594fa36ded24719d (diff)
downloadcpython-55fa66dd45e76a57deca8cebaedf1a624499648b.zip
cpython-55fa66dd45e76a57deca8cebaedf1a624499648b.tar.gz
cpython-55fa66dd45e76a57deca8cebaedf1a624499648b.tar.bz2
Add comments about PyThreadState and the usage of its fields.
Diffstat (limited to 'Include/pystate.h')
-rw-r--r--Include/pystate.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/Include/pystate.h b/Include/pystate.h
index 1ff2626..bfd3548 100644
--- a/Include/pystate.h
+++ b/Include/pystate.h
@@ -53,12 +53,16 @@ typedef int (*Py_tracefunc)(PyObject *, struct _frame *, int, PyObject *);
#define PyTrace_C_RETURN 6
typedef struct _ts {
+ /* See Python/ceval.c for comments explaining most fields */
struct _ts *next;
PyInterpreterState *interp;
struct _frame *frame;
int recursion_depth;
+ /* 'tracing' keeps track of the execution depth when tracing/profiling.
+ This is to prevent the actual trace/profile code from being recorded in
+ the trace/profile. */
int tracing;
int use_tracing;
@@ -75,7 +79,7 @@ typedef struct _ts {
PyObject *exc_value;
PyObject *exc_traceback;
- PyObject *dict;
+ PyObject *dict; /* Stores per-thread state */
/* tick_counter is incremented whenever the check_interval ticker
* reaches zero. The purpose is to give a useful measure of the number