]> granicus.if.org Git - python/commitdiff
Remove variable owned from PyUnicode_FromEncodedObject, which is unused
authorWalter Dörwald <walter@livinglogic.de>
Wed, 8 Jan 2003 20:38:39 +0000 (20:38 +0000)
committerWalter Dörwald <walter@livinglogic.de>
Wed, 8 Jan 2003 20:38:39 +0000 (20:38 +0000)
(except for Py_DECREF calls) since the introduction of __unicode__.

Objects/unicodeobject.c

index 8dcec514c73d12d39e3232f36945cb36697ebde9..1e4907ac4285f94ae303c25c9f243e97cb960ea0 100644 (file)
@@ -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;
 }