Simplify PyUnicode_FSConverter(): remove reference to PyByteArray

PyByteArray is no more supported
This commit is contained in:
Victor Stinner 2010-04-30 00:22:08 +00:00
parent 8130290d42
commit 0ea2a468e3

View file

@ -1650,14 +1650,8 @@ PyUnicode_FSConverter(PyObject* arg, void* addr)
return 0; return 0;
} }
} }
if (PyBytes_Check(output)) {
size = PyBytes_GET_SIZE(output); size = PyBytes_GET_SIZE(output);
data = PyBytes_AS_STRING(output); data = PyBytes_AS_STRING(output);
}
else {
size = PyByteArray_GET_SIZE(output);
data = PyByteArray_AS_STRING(output);
}
if (size != strlen(data)) { if (size != strlen(data)) {
PyErr_SetString(PyExc_TypeError, "embedded NUL character"); PyErr_SetString(PyExc_TypeError, "embedded NUL character");
Py_DECREF(output); Py_DECREF(output);