• Guido van Rossum's avatar
    Enable GC for new-style instances. This touches lots of files, since · 9475a231
    Guido van Rossum yazdı
    many types were subclassable but had a xxx_dealloc function that
    called PyObject_DEL(self) directly instead of deferring to
    self->ob_type->tp_free(self).  It is permissible to set tp_free in the
    type object directly to _PyObject_Del, for non-GC types, or to
    _PyObject_GC_Del, for GC types.  Still, PyObject_DEL was a tad faster,
    so I'm fearing that our pystone rating is going down again.  I'm not
    sure if doing something like
    
    void xxx_dealloc(PyObject *self)
    {
    	if (PyXxxCheckExact(self))
    		PyObject_DEL(self);
    	else
    		self->ob_type->tp_free(self);
    }
    
    is any faster than always calling the else branch, so I haven't
    attempted that -- however those types whose own dealloc is fancier
    (int, float, unicode) do use this pattern.
    9475a231
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...
acconfig.h 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...