From dd18d3ad9ef26099b0f8677ff2298e21669f3686 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Sat, 22 Oct 2011 11:08:10 +0200 Subject: Fix unicode_subtype_new() on debug build Patch written by Stefan Behnel. --- Objects/unicodeobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 01d87dc..ec4aed6 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: -- cgit v0.12