[Python-checkins] CVS: python/dist/src/Modules cPickle.c,2.52,2.53

Neil Schemenauer python-dev@python.org
Wed, 4 Oct 2000 09:22:31 -0700


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;
                }