On Wed, Oct 04, 2000 at 09:22:31AM -0700, Neil Schemenauer wrote: > Update of /cvsroot/python/python/dist/src/Modules > In directory slayer.i.sourceforge.net:/tmp/cvs-serv16887/Modules > > Modified Files: > cPickle.c > Log Message: > - Fix a GC bug caused by PyDict_New() failing. > > > Index: cPickle.c > =================================================================== > RCS file: /cvsroot/python/python/dist/src/Modules/cPickle.c,v > retrieving revision 2.52 > retrieving revision 2.53 > diff -C2 -r2.52 -r2.53 > *** cPickle.c 2000/09/07 14:35:37 2.52 > --- cPickle.c 2000/10/04 16:22:26 2.53 > *************** > *** 2876,2880 **** > Py_INCREF(cls); > UNLESS (inst->in_dict=PyDict_New()) { > ! Py_DECREF(inst); > goto err; > } > --- 2876,2881 ---- > Py_INCREF(cls); > UNLESS (inst->in_dict=PyDict_New()) { > ! inst = (PyInstanceObject *) PyObject_AS_GC(inst); > ! PyObject_DEL(inst); > goto err; > } I aways seem to think harder when reviewing a commit message than a diff. :( I just realized that this commit subtly modifies cPickle's behavior. Before the change instances __del__ methods would be called if allocating __dict__ failed. After the change they are not. I think the new behavior is better but the question is will it break existing code? I think probably not. BTW, pickle seems to follow the new behavior. Neil
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4