Commit d7993a95 authored by Boxiang Sun's avatar Boxiang Sun

Allow BoxedList::allocated is -1

If BoxedList::allocated is -1, it means the items inside were changed.
Some CPython list functions need this to check exceptions.
parent bc3e118d
......@@ -48,7 +48,7 @@ extern "C" inline void listAppendInternalStolen(Box* s, Box* v) {
assert(PyList_Check(s));
BoxedList* self = static_cast<BoxedList*>(s);
assert(self->size <= self->allocated);
assert(self->size <= self->allocated || self->allocated == -1);
self->ensure(1);
assert(self->size < self->allocated);
......
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