diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-06-23 05:26:56 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-06-23 05:26:56 (GMT) |
commit | 8c96369513ded66146f9cf19678029615e29bcb7 (patch) | |
tree | 76bd8eda4dd36f653ce54cbef09ddc9bbf1b4a92 /Include | |
parent | f5eae668a81050919293453054be392cfe4f6b8d (diff) | |
download | cpython-8c96369513ded66146f9cf19678029615e29bcb7.zip cpython-8c96369513ded66146f9cf19678029615e29bcb7.tar.gz cpython-8c96369513ded66146f9cf19678029615e29bcb7.tar.bz2 |
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')
-rw-r--r-- | Include/frameobject.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Include/frameobject.h b/Include/frameobject.h index b620f76..e2bf7a1 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; |