Commit 348e7637 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Get contains.py working

parent f1e90870
......@@ -1161,7 +1161,7 @@ static PyObject* slot_tp_del(PyObject* self) noexcept {
PyObject* slot_sq_item(PyObject* self, Py_ssize_t i) noexcept {
STAT_TIMER(t0, "us_timer_slot_sqitem", SLOT_AVOIDABILITY(self));
return getitemInternal<CAPI>(self, boxInt(i));
return getitemInternal<CAPI>(self, autoDecref(boxInt(i)));
}
/* Pyston change: static */ Py_ssize_t slot_sq_length(PyObject* self) noexcept {
......
......@@ -1027,9 +1027,9 @@ static Box* instanceIter(BoxedInstance* self) {
}
if ((func = _instanceGetattribute(self, getitem_str, false)) == NULL) {
AUTO_DECREF(func);
raiseExcHelper(TypeError, "iteration over non-sequence");
}
Py_DECREF(func);
Box* r = PySeqIter_New((PyObject*)self);
if (!r)
......
# expected: reffail
class C(object):
def __init__(self, x):
self.x = x
......
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