[Python-checkins] cpython: Issue #20284: Fix a compilation warning on Windows

victor.stinner python-checkins at python.org
Mon Jan 26 17:05:30 CET 2015


https://hg.python.org/cpython/rev/db7ec64aac39
changeset: 94322:db7ec64aac39
user: Victor Stinner <victor.stinner at gmail.com>
date: Mon Jan 26 16:43:36 2015 +0100
summary:
 Issue #20284: Fix a compilation warning on Windows
Explicitly cast the long to char.
files:
 Objects/bytesobject.c | 2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
--- a/Objects/bytesobject.c
+++ b/Objects/bytesobject.c
@@ -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円';
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /