Commit 99f5f5c6 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Minor fixes

parent 92596a7d
...@@ -919,6 +919,7 @@ BORROWED(Box*) FrameInfo::updateBoxedLocals() { ...@@ -919,6 +919,7 @@ BORROWED(Box*) FrameInfo::updateBoxedLocals() {
PyDict_SetItem(d, boxedName, val); PyDict_SetItem(d, boxedName, val);
} else { } else {
PyDict_DelItem(d, boxedName); PyDict_DelItem(d, boxedName);
PyErr_Clear();
} }
} }
......
...@@ -438,10 +438,11 @@ Box* dictDelitem(BoxedDict* self, Box* k) { ...@@ -438,10 +438,11 @@ Box* dictDelitem(BoxedDict* self, Box* k) {
raiseExcHelper(KeyError, k); raiseExcHelper(KeyError, k);
} }
Box* old_k = it->first.value;
Box* v = it->second; Box* v = it->second;
self->d.erase(it); self->d.erase(it);
Py_DECREF(v); Py_DECREF(v);
Py_DECREF(k); Py_DECREF(old_k);
Py_RETURN_NONE; Py_RETURN_NONE;
} }
......
# expected: reffail
# The use of c makes sure a closure gets passed through all 4 functions. # The use of c makes sure a closure gets passed through all 4 functions.
# The use of a in g makes sure that a is in f's closure. # The use of a in g makes sure that a is in f's closure.
# The a in j should refer to the a in h, thus throwing an exception since # The a in j should refer to the a in h, thus throwing an exception since
......
# expected: reffail
import os import os
import sys import sys
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment