Commit 18d1bb83 authored by Kevin Modzelewski's avatar Kevin Modzelewski

A few more fixes

parent 472952d8
......@@ -426,7 +426,7 @@ Box* sorted(Box* obj, Box* cmp, Box* key, Box** args) {
BoxedList* rtn = new BoxedList();
for (Box* e : obj->pyElements()) {
listAppendInternal(rtn, e);
listAppendInternalStolen(rtn, e);
}
listSort(rtn, cmp, key, reverse);
......
......@@ -93,8 +93,10 @@ private:
public:
BoxIteratorIndex(T* obj) : obj(obj), index(0) {
Py_XINCREF(obj);
if (obj && !hasnext(obj, index))
if (obj && !hasnext(obj, index)) {
Py_CLEAR(obj);
*this = *end();
}
}
~BoxIteratorIndex() {
......
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