• Armin Rigo's avatar
    * drop the unreasonable list invariant that ob_item should never come back · 93677f07
    Armin Rigo yazdı
      to NULL during the lifetime of the object.
    
    * listobject.c nevertheless did not conform to the other invariants,
      either; fixed.
    
    * listobject.c now uses list_clear() as the obvious internal way to clear
      a list, instead of abusing list_ass_slice() for that.  It makes it easier
      to enforce the invariant about ob_item == NULL.
    
    * listsort() sets allocated to -1 during sort; any mutation will set it
      to a value >= 0, so it is a safe way to detect mutation.  A negative
      value for allocated does not cause a problem elsewhere currently.
      test_sort.py has a new test for this fix.
    
    * listsort() leak: if items were added to the list during the sort, AND if
      these items had a __del__ that puts still more stuff into the list,
      then this more stuff (and the PyObject** array to hold them) were
      overridden at the end of listsort() and never released.
    93677f07
Adı
Son kayıt (commit)
Son güncelleme
Demo Loading commit data...
Doc Loading commit data...
Grammar Loading commit data...
Include Loading commit data...
Lib Loading commit data...
Mac Loading commit data...
Misc Loading commit data...
Modules Loading commit data...
Objects Loading commit data...
PC Loading commit data...
PCbuild Loading commit data...
Parser Loading commit data...
Python Loading commit data...
RISCOS Loading commit data...
Tools Loading commit data...
.cvsignore Loading commit data...
.hgtags Loading commit data...
LICENSE Loading commit data...
Makefile.pre.in Loading commit data...
README Loading commit data...
aclocal.m4 Loading commit data...
configure Loading commit data...
configure.in Loading commit data...
install-sh Loading commit data...
pyconfig.h.in Loading commit data...
setup.py Loading commit data...