changeset: 94322:db7ec64aac39 user: Victor Stinner date: Mon Jan 26 16:43:36 2015 +0100 files: Objects/bytesobject.c description: Issue #20284: Fix a compilation warning on Windows Explicitly cast the long to char. diff -r e124aab5d9a0 -r db7ec64aac39 Objects/bytesobject.c --- a/Objects/bytesobject.c Mon Jan 26 16:41:32 2015 +0100 +++ b/Objects/bytesobject.c Mon Jan 26 16:43:36 2015 +0100 @@ -529,7 +529,7 @@ "%c requires an integer in range(256) or a single byte"); goto error; } - buf[0] = ival; + buf[0] = (char)ival; } Py_XDECREF(w); buf[1] = '\0';