• 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
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...
PLAN.txt Loading commit data...
README 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...