summaryrefslogtreecommitdiffstats
path: root/Objects/bytesobject.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-01-26 15:43:36 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-01-26 15:43:36 (GMT)
commit5474d0ba19e7fadf98440369216b0b66d6b7e647 (patch)
treede088b3d531c3254fecca0ab21df79e7cbd4a6c8 /Objects/bytesobject.c
parent29dacf2e97314a16db3f2bef492d1c46f39ad656 (diff)
downloadcpython-5474d0ba19e7fadf98440369216b0b66d6b7e647.zip
cpython-5474d0ba19e7fadf98440369216b0b66d6b7e647.tar.gz
cpython-5474d0ba19e7fadf98440369216b0b66d6b7e647.tar.bz2
Issue #20284: Fix a compilation warning on Windows
Explicitly cast the long to char.
Diffstat (limited to 'Objects/bytesobject.c')
-rw-r--r--Objects/bytesobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
index 154640e..d4f7d01 100644
--- a/Objects/bytesobject.c
+++ b/Objects/bytesobject.c
@@ -529,7 +529,7 @@ formatchar(char *buf, size_t buflen, PyObject *v)
"%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';