summaryrefslogtreecommitdiffstats
path: root/Include/frameobject.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/frameobject.h')
-rw-r--r--Include/frameobject.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/Include/frameobject.h b/Include/frameobject.h
index 7dc14e3..cce598b 100644
--- a/Include/frameobject.h
+++ b/Include/frameobject.h
@@ -26,7 +26,16 @@ typedef struct _frame {
to the current stack top. */
PyObject **f_stacktop;
PyObject *f_trace; /* Trace function */
+
+ /* If an exception is raised in this frame, the next three are used to
+ * record the exception info (if any) originally in the thread state. See
+ * comments before set_exc_info() -- it's not obvious.
+ * Invariant: if _type is NULL, then so are _value and _traceback.
+ * Desired invariant: all three are NULL, or all three are non-NULL. That
+ * one isn't currently true, but "should be".
+ */
PyObject *f_exc_type, *f_exc_value, *f_exc_traceback;
+
PyThreadState *f_tstate;
int f_lasti; /* Last instruction if called */
/* As of 2.3 f_lineno is only valid when tracing is active (i.e. when
@@ -36,10 +45,6 @@ typedef struct _frame {
in this scope */
int f_iblock; /* index in f_blockstack */
PyTryBlock f_blockstack[CO_MAXBLOCKS]; /* for try and loop blocks */
- int f_nlocals; /* number of locals */
- int f_ncells;
- int f_nfreevars;
- int f_stacksize; /* size of value stack */
PyObject *f_localsplus[1]; /* locals+stack, dynamically sized */
} PyFrameObject;