From: Victor Stinner Date: Sat, 22 Oct 2011 09:08:10 +0000 (+0200) Subject: Fix unicode_subtype_new() on debug build X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dd18d3ad9ef26099b0f8677ff2298e21669f3686;p=python Fix unicode_subtype_new() on debug build Patch written by Stefan Behnel. --- diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 01d87dc6a9..ec4aed6e2d 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -13825,11 +13825,11 @@ unicode_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds) Py_MEMCPY(data, PyUnicode_DATA(unicode), kind * (length + 1)); - Py_DECREF(unicode); assert(_PyUnicode_CheckConsistency(self, 1)); #ifdef Py_DEBUG _PyUnicode_HASH(self) = _PyUnicode_HASH(unicode); #endif + Py_DECREF(unicode); return (PyObject *)self; onError: