mirror of
https://github.com/python/cpython.git
synced 2025-11-27 13:45:25 +00:00
Return PyString, not PyBytes, for a bytes array.
Clean up trailing whitespace.
This commit is contained in:
parent
b0efee2669
commit
82c0dfa3bd
1 changed files with 25 additions and 25 deletions
|
|
@ -952,7 +952,7 @@ FromObj(PyObject* tkapp, Tcl_Obj *value)
|
||||||
if (value->typePtr == app->ByteArrayType) {
|
if (value->typePtr == app->ByteArrayType) {
|
||||||
int size;
|
int size;
|
||||||
char *data = (char*)Tcl_GetByteArrayFromObj(value, &size);
|
char *data = (char*)Tcl_GetByteArrayFromObj(value, &size);
|
||||||
return PyBytes_FromStringAndSize(data, size);
|
return PyString_FromStringAndSize(data, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value->typePtr == app->DoubleType) {
|
if (value->typePtr == app->DoubleType) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue