Fix unicode_subtype_new() on debug build

Patch written by Stefan Behnel.
This commit is contained in:
Victor Stinner 2011-10-22 11:08:10 +02:00
parent df7b66546c
commit dd18d3ad9e
1 changed files with 1 additions and 1 deletions

View File

@ -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: