[Python-checkins] cpython: Issue #18408: Oh, I was wrong: Pickler_New() must call Py_DECREF() to destroy

victor.stinner python-checkins at python.org
Fri Jul 12 00:59:05 CEST 2013


http://hg.python.org/cpython/rev/1eac89af9acf
changeset:   84572:1eac89af9acf
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Fri Jul 12 00:08:59 2013 +0200
summary:
  Issue #18408: Oh, I was wrong: Pickler_New() must call Py_DECREF() to destroy
the newly created pickler, and not PyObject_GC_Del().

files:
  Modules/_pickle.c |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Modules/_pickle.c b/Modules/_pickle.c
--- a/Modules/_pickle.c
+++ b/Modules/_pickle.c
@@ -782,7 +782,7 @@
                                                     self->max_output_len);
 
     if (self->memo == NULL || self->output_buffer == NULL) {
-        PyObject_GC_Del(self);
+        Py_DECREF(self);
         return NULL;
     }
     return self;

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list