Fix refleak in internal_print() introduced by myself in r81251

_PyUnicode_AsDefaultEncodedString() uses a magical PyUnicode attribute to
automatically destroy PyUnicode_EncodeUTF8() result when the unicode string is
destroyed.
This commit is contained in:
Victor Stinner 2010-05-17 09:33:42 +00:00
parent e9fb319e68
commit ba6b430bd0

View file

@ -311,6 +311,7 @@ internal_print(PyObject *op, FILE *fp, int flags, int nesting)
else {
fwrite(PyBytes_AS_STRING(t), 1,
PyBytes_GET_SIZE(t), fp);
Py_DECREF(t);
}
}
else {