summaryrefslogtreecommitdiff
path: root/Include/frameobject.h
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-06-23 05:26:56 +0000
committerTim Peters <tim.peters@gmail.com>2001-06-23 05:26:56 +0000
commit8c96369513ded66146f9cf19678029615e29bcb7 (patch)
tree76bd8eda4dd36f653ce54cbef09ddc9bbf1b4a92 /Include/frameobject.h
parentf5eae668a81050919293453054be392cfe4f6b8d (diff)
downloadcpython-git-8c96369513ded66146f9cf19678029615e29bcb7.tar.gz
PyFrameObject: rename f_stackbottom to f_stacktop, since it points to
the next free valuestack slot, not to the base (in America, stacks push and pop at the top -- they mutate at the bottom in Australia <winK>). eval_frame(): assert that f_stacktop isn't NULL upon entry. frame_delloc(): avoid ordered pointer comparisons involving f_stacktop when f_stacktop is NULL.
Diffstat (limited to 'Include/frameobject.h')
-rw-r--r--Include/frameobject.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/Include/frameobject.h b/Include/frameobject.h
index b620f7652f..e2bf7a1ef6 100644
--- a/Include/frameobject.h
+++ b/Include/frameobject.h
@@ -21,8 +21,10 @@ typedef struct _frame {
PyObject *f_globals; /* global symbol table (PyDictObject) */
PyObject *f_locals; /* local symbol table (PyDictObject) */
PyObject **f_valuestack; /* points after the last local */
- PyObject **f_stackbottom; /* points to the last item on the stack if
- frame has yielded. */
+ /* Next free slot in f_valuestack. Frame creation sets to f_valuestack.
+ Frame evaluation usually NULLs it, but a frame that yields sets it
+ to the current stack top. */
+ PyObject **f_stacktop;
PyObject *f_trace; /* Trace function */
PyObject *f_exc_type, *f_exc_value, *f_exc_traceback;
PyThreadState *f_tstate;