From: Walter Dörwald Date: Wed, 8 Jan 2003 20:38:39 +0000 (+0000) Subject: Remove variable owned from PyUnicode_FromEncodedObject, which is unused X-Git-Tag: v2.3c1~2514 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=034d97605d5300721310a0d7320b41f67237007b;p=python Remove variable owned from PyUnicode_FromEncodedObject, which is unused (except for Py_DECREF calls) since the introduction of __unicode__. --- diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 8dcec514c7..1e4907ac42 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -452,7 +452,6 @@ PyObject *PyUnicode_FromEncodedObject(register PyObject *obj, { const char *s = NULL; int len; - int owned = 0; PyObject *v; if (obj == NULL) { @@ -510,15 +509,9 @@ PyObject *PyUnicode_FromEncodedObject(register PyObject *obj, else v = PyUnicode_Decode(s, len, encoding, errors); - if (owned) { - Py_DECREF(obj); - } return v; onError: - if (owned) { - Py_DECREF(obj); - } return NULL; }