• Guido van Rossum's avatar
    A modest speedup of object deallocation. call_finalizer() did rather · febd61dc
    Guido van Rossum yazdı
    a lot of work: it had to save and restore the current exception around
    a call to lookup_maybe(), because that could fail in rare cases, and
    most objects don't have a __del__ method, so the whole exercise was
    usually a waste of time.  Changed this to cache the __del__ method in
    the type object just like all other special methods, in a new slot
    tp_del.  So now subtype_dealloc() can test whether tp_del is NULL and
    skip the whole exercise if it is.  The new slot doesn't need a new
    flag bit: subtype_dealloc() is only called if the type was dynamically
    allocated by type_new(), so it's guaranteed to have all current slots.
    Types defined in C cannot fill in tp_del with a function of their own,
    so there's no corresponding "wrapper".  (That functionality is already
    available through tp_dealloc.)
    febd61dc
Adı
Son kayıt (commit)
Son güncelleme
..
.cvsignore Loading commit data...
abstract.c Loading commit data...
boolobject.c Loading commit data...
bufferobject.c Loading commit data...
cellobject.c Loading commit data...
classobject.c Loading commit data...
cobject.c Loading commit data...
complexobject.c Loading commit data...
descrobject.c Loading commit data...
dictobject.c Loading commit data...
enumobject.c Loading commit data...
fileobject.c Loading commit data...
floatobject.c Loading commit data...
frameobject.c Loading commit data...
funcobject.c Loading commit data...
intobject.c Loading commit data...
iterobject.c Loading commit data...
listobject.c Loading commit data...
listsort.txt Loading commit data...
longobject.c Loading commit data...
methodobject.c Loading commit data...
moduleobject.c Loading commit data...
object.c Loading commit data...
obmalloc.c Loading commit data...
rangeobject.c Loading commit data...
sliceobject.c Loading commit data...
stringobject.c Loading commit data...
structseq.c Loading commit data...
tupleobject.c Loading commit data...
typeobject.c Loading commit data...
unicodectype.c Loading commit data...
unicodeobject.c Loading commit data...
unicodetype_db.h Loading commit data...
weakrefobject.c Loading commit data...
xxobject.c Loading commit data...