diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-06-18 22:08:13 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-06-18 22:08:13 (GMT) |
commit | 5ca576ed0a0c697c7e7547adfd0b3af010fd2053 (patch) | |
tree | 0b0db361191363b3c168a6c105030f53e181d3e5 /Objects/frameobject.c | |
parent | 1dad6a86de55c38da5c356c2c6d81be8ff7884b1 (diff) | |
download | cpython-5ca576ed0a0c697c7e7547adfd0b3af010fd2053.zip cpython-5ca576ed0a0c697c7e7547adfd0b3af010fd2053.tar.gz cpython-5ca576ed0a0c697c7e7547adfd0b3af010fd2053.tar.bz2 |
Merging the gen-branch into the main line, at Guido's direction. Yay!
Bugfix candidate in inspect.py: it was referencing "self" outside of
a method.
Diffstat (limited to 'Objects/frameobject.c')
-rw-r--r-- | Objects/frameobject.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Objects/frameobject.c b/Objects/frameobject.c index 6e66d23..c38c5fb 100644 --- a/Objects/frameobject.c +++ b/Objects/frameobject.c @@ -67,6 +67,7 @@ frame_dealloc(PyFrameObject *f) { int i, slots; PyObject **fastlocals; + PyObject **p; Py_TRASHCAN_SAFE_BEGIN(f) /* Kill all local variables */ @@ -76,6 +77,10 @@ frame_dealloc(PyFrameObject *f) Py_XDECREF(*fastlocals); } + /* Free stack */ + for (p = f->f_valuestack; p < f->f_stackbottom; p++) { + Py_XDECREF(*p); + } Py_XDECREF(f->f_back); Py_XDECREF(f->f_code); Py_XDECREF(f->f_builtins); @@ -221,6 +226,7 @@ PyFrame_New(PyThreadState *tstate, PyCodeObject *code, PyObject *globals, f->f_localsplus[extras] = NULL; f->f_valuestack = f->f_localsplus + (f->f_nlocals + ncells + nfrees); + f->f_stackbottom = f->f_valuestack; return f; } |