mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-25 00:00:34 +03:00
removing unreachable code
This commit is contained in:
parent
3f4abf6caa
commit
782e8e64d2
17
_imaging.c
17
_imaging.c
|
@ -2226,23 +2226,6 @@ void _font_text_asBytes(PyObject* encoded_string, unsigned char** text){
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
/* UNDONE not reachable code */
|
|
||||||
|
|
||||||
#if PY_VERSION_HEX < 0x03000000
|
|
||||||
/* likely case here is py2.x with an ordinary string.
|
|
||||||
but this isn't defined in Py3.x */
|
|
||||||
if (PyString_Check(encoded_string)) {
|
|
||||||
PyString_AsStringAndSize(encoded_string, &buffer, &len);
|
|
||||||
*text = calloc(len,1);
|
|
||||||
if (*text) {
|
|
||||||
memcpy(*text, buffer, len+1);
|
|
||||||
} else {
|
|
||||||
ImagingError_MemoryError();
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user