python/dist/src/Objects listobject.c,2.213,2.214

Update of /cvsroot/python/python/dist/src/Objects In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19327 Modified Files: listobject.c Log Message: What if you call lst.__init__() while it is being sorted? :-) The invariant checks would break. Index: listobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/listobject.c,v retrieving revision 2.213 retrieving revision 2.214 diff -C2 -d -r2.213 -r2.214 *** listobject.c 29 Jul 2004 23:31:29 -0000 2.213 --- listobject.c 30 Jul 2004 11:20:18 -0000 2.214 *************** *** 2316,2321 **** /* Verify list invariants established by PyType_GenericAlloc() */ ! assert(0 <= self->ob_size && self->ob_size <= self->allocated); ! assert(self->ob_item != NULL || self->allocated == 0); /* Empty previous contents */ --- 2316,2323 ---- /* Verify list invariants established by PyType_GenericAlloc() */ ! assert(0 <= self->ob_size); ! assert(self->ob_size <= self->allocated || self->allocated == -1); ! assert(self->ob_item != NULL || ! self->allocated == 0 || self->allocated == -1); /* Empty previous contents */
participants (1)
-
arigoļ¼ users.sourceforge.net