Remove variable owned from PyUnicode_FromEncodedObject, which is unused
(except for Py_DECREF calls) since the introduction of __unicode__.
This commit is contained in:
parent
8a978f7cde
commit
034d97605d
|
@ -452,7 +452,6 @@ PyObject *PyUnicode_FromEncodedObject(register PyObject *obj,
|
||||||
{
|
{
|
||||||
const char *s = NULL;
|
const char *s = NULL;
|
||||||
int len;
|
int len;
|
||||||
int owned = 0;
|
|
||||||
PyObject *v;
|
PyObject *v;
|
||||||
|
|
||||||
if (obj == NULL) {
|
if (obj == NULL) {
|
||||||
|
@ -510,15 +509,9 @@ PyObject *PyUnicode_FromEncodedObject(register PyObject *obj,
|
||||||
else
|
else
|
||||||
v = PyUnicode_Decode(s, len, encoding, errors);
|
v = PyUnicode_Decode(s, len, encoding, errors);
|
||||||
|
|
||||||
if (owned) {
|
|
||||||
Py_DECREF(obj);
|
|
||||||
}
|
|
||||||
return v;
|
return v;
|
||||||
|
|
||||||
onError:
|
onError:
|
||||||
if (owned) {
|
|
||||||
Py_DECREF(obj);
|
|
||||||
}
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue