Staging
v0.5.1
v0.5.1
https://github.com/python/cpython
Revision 97719c9ce56bfb19fa7b0833c8c7947ad2fd7e52 authored by Tim Peters on 21 May 2003, 20:43:10 UTC, committed by Tim Peters on 21 May 2003, 20:43:10 UTC
tp_free is NULL or PyObject_Del at the end. Because it's a base type it must call tp_free in its dealloc function, and because it's gc'able it must not call PyObject_Del. inherit_slots(): Don't inherit tp_free unless the type and its base agree about whether they're gc'able. If the type is gc'able and the base is not, and the base uses the default PyObject_Del for its tp_free, give the type PyObject_GC_Del for its tp_free (the appropriate default for a gc'able type). cPickle.c: The Pickler and Unpickler types claim to be base classes and gc'able, but their dealloc functions didn't call tp_free. Repaired that. Also call PyType_Ready() on these typeobjects, so that the correct (PyObject_GC_Del) default memory-freeing function gets plugged into these types' tp_free slots.
1 parent 54d9cdf
Tip revision: 97719c9ce56bfb19fa7b0833c8c7947ad2fd7e52 authored by Tim Peters on 21 May 2003, 20:43:10 UTC
PyType_Ready(): Complain if the type is a base type, and gc'able, and
PyType_Ready(): Complain if the type is a base type, and gc'able, and
Tip revision: 97719c9
File | Mode | Size |
---|---|---|
.cvsignore | -rw-r--r-- | 93 bytes |
Setup.config.in | -rw-r--r-- | 396 bytes |
Setup.dist | -rw-r--r-- | 16.5 KB |
_codecsmodule.c | -rw-r--r-- | 16.3 KB |
_curses_panel.c | -rw-r--r-- | 12.7 KB |
_cursesmodule.c | -rw-r--r-- | 71.9 KB |
_hotshot.c | -rw-r--r-- | 44.7 KB |
_localemodule.c | -rw-r--r-- | 16.0 KB |
_sre.c | -rw-r--r-- | 79.6 KB |
_testcapimodule.c | -rw-r--r-- | 8.3 KB |
_tkinter.c | -rw-r--r-- | 47.8 KB |
_weakref.c | -rw-r--r-- | 3.6 KB |
addrinfo.h | -rw-r--r-- | 5.5 KB |
almodule.c | -rw-r--r-- | 79.1 KB |
ar_beos | -rwxr-xr-x | 1.8 KB |
arraymodule.c | -rw-r--r-- | 37.0 KB |
audioop.c | -rw-r--r-- | 36.5 KB |
binascii.c | -rw-r--r-- | 40.7 KB |
bsddbmodule.c | -rw-r--r-- | 19.1 KB |
cPickle.c | -rw-r--r-- | 110.3 KB |
cStringIO.c | -rw-r--r-- | 21.5 KB |
ccpython.cc | -rw-r--r-- | 220 bytes |
cdmodule.c | -rw-r--r-- | 18.5 KB |
cgen.py | -rw-r--r-- | 12.2 KB |
cgensupport.c | -rw-r--r-- | 6.0 KB |
cgensupport.h | -rw-r--r-- | 2.1 KB |
clmodule.c | -rw-r--r-- | 65.4 KB |
cmathmodule.c | -rw-r--r-- | 7.6 KB |
config.c.in | -rw-r--r-- | 1.2 KB |
cryptmodule.c | -rw-r--r-- | 986 bytes |
cstubs | -rw-r--r-- | 32.4 KB |
dbmmodule.c | -rw-r--r-- | 8.7 KB |
dlmodule.c | -rw-r--r-- | 5.2 KB |
errnomodule.c | -rw-r--r-- | 23.3 KB |
fcntlmodule.c | -rw-r--r-- | 12.1 KB |
flmodule.c | -rw-r--r-- | 48.6 KB |
fmmodule.c | -rw-r--r-- | 5.1 KB |
fpectlmodule.c | -rw-r--r-- | 10.3 KB |
fpetestmodule.c | -rw-r--r-- | 5.5 KB |
gcmodule.c | -rw-r--r-- | 24.5 KB |
gdbmmodule.c | -rw-r--r-- | 14.7 KB |
getaddrinfo.c | -rw-r--r-- | 15.5 KB |
getbuildinfo.c | -rw-r--r-- | 533 bytes |
getnameinfo.c | -rw-r--r-- | 5.5 KB |
getpath.c | -rw-r--r-- | 18.0 KB |
glmodule.c | -rw-r--r-- | 149.1 KB |
grpmodule.c | -rw-r--r-- | 3.4 KB |
imageop.c | -rw-r--r-- | 14.3 KB |
imgfile.c | -rw-r--r-- | 10.9 KB |
ld_so_aix | -rwxr-xr-x | 5.8 KB |
ld_so_beos | -rwxr-xr-x | 1.8 KB |
license.terms | -rw-r--r-- | 2.2 KB |
linuxaudiodev.c | -rw-r--r-- | 13.3 KB |
main.c | -rw-r--r-- | 9.9 KB |
makesetup | -rwxr-xr-x | 7.2 KB |
makexp_aix | -rwxr-xr-x | 3.0 KB |
mathmodule.c | -rw-r--r-- | 9.4 KB |
md5.h | -rw-r--r-- | 2.0 KB |
md5c.c | -rw-r--r-- | 9.4 KB |
md5module.c | -rw-r--r-- | 6.2 KB |
mmapmodule.c | -rw-r--r-- | 25.6 KB |
mpzmodule.c | -rw-r--r-- | 39.7 KB |
newmodule.c | -rw-r--r-- | 5.1 KB |
nismodule.c | -rw-r--r-- | 7.3 KB |
operator.c | -rw-r--r-- | 9.8 KB |
parsermodule.c | -rw-r--r-- | 84.0 KB |
pcre-int.h | -rw-r--r-- | 11.2 KB |
pcre.h | -rw-r--r-- | 2.1 KB |
pcremodule.c | -rw-r--r-- | 14.9 KB |
posixmodule.c | -rw-r--r-- | 149.3 KB |
puremodule.c | -rw-r--r-- | 29.7 KB |
pwdmodule.c | -rw-r--r-- | 3.1 KB |
pyexpat.c | -rw-r--r-- | 55.7 KB |
pypcre.c | -rw-r--r-- | 134.2 KB |
python.c | -rw-r--r-- | 201 bytes |
readline.c | -rw-r--r-- | 14.9 KB |
regexmodule.c | -rw-r--r-- | 15.0 KB |
regexpr.c | -rw-r--r-- | 45.7 KB |
regexpr.h | -rw-r--r-- | 5.4 KB |
resource.c | -rw-r--r-- | 5.7 KB |
rgbimgmodule.c | -rw-r--r-- | 16.3 KB |
rotormodule.c | -rw-r--r-- | 14.3 KB |
selectmodule.c | -rw-r--r-- | 16.3 KB |
sgimodule.c | -rw-r--r-- | 981 bytes |
shamodule.c | -rw-r--r-- | 15.6 KB |
signalmodule.c | -rw-r--r-- | 15.3 KB |
socketmodule.c | -rw-r--r-- | 94.6 KB |
sre.h | -rw-r--r-- | 2.4 KB |
sre_constants.h | -rw-r--r-- | 2.4 KB |
stropmodule.c | -rw-r--r-- | 27.6 KB |
structmodule.c | -rw-r--r-- | 31.3 KB |
sunaudiodev.c | -rw-r--r-- | 10.7 KB |
svmodule.c | -rw-r--r-- | 20.0 KB |
symtablemodule.c | -rw-r--r-- | 2.4 KB |
syslogmodule.c | -rw-r--r-- | 6.1 KB |
tclNotify.c | -rw-r--r-- | 25.1 KB |
termios.c | -rw-r--r-- | 18.0 KB |
testcapi_long.h | -rw-r--r-- | 4.2 KB |
threadmodule.c | -rw-r--r-- | 10.5 KB |
timemodule.c | -rw-r--r-- | 22.5 KB |
timing.h | -rw-r--r-- | 2.6 KB |
timingmodule.c | -rw-r--r-- | 1.1 KB |
tkappinit.c | -rw-r--r-- | 3.7 KB |
unicodedata.c | -rw-r--r-- | 12.1 KB |
unicodedata_db.h | -rw-r--r-- | 132.6 KB |
unicodename_db.h | -rw-r--r-- | 564.2 KB |
xreadlinesmodule.c | -rw-r--r-- | 3.8 KB |
xxmodule.c | -rw-r--r-- | 6.0 KB |
xxsubtype.c | -rw-r--r-- | 6.7 KB |
yuv.h | -rw-r--r-- | 2.5 KB |
yuvconvert.c | -rw-r--r-- | 3.0 KB |
zlibmodule.c | -rw-r--r-- | 24.3 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...