summaryrefslogtreecommitdiffstats
path: root/Objects/bytesobject.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-10-12 11:57:47 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-10-12 11:57:47 (GMT)
commite9aa5950bb6ae7eab553e915402eddcb610565e4 (patch)
tree2caec37e20d8c3a43943e4ce3cca6034262c5dd9 /Objects/bytesobject.c
parent6c2cdae9e6b664a0b3e204773aeb8954ae1508e1 (diff)
downloadcpython-e9aa5950bb6ae7eab553e915402eddcb610565e4.zip
cpython-e9aa5950bb6ae7eab553e915402eddcb610565e4.tar.gz
cpython-e9aa5950bb6ae7eab553e915402eddcb610565e4.tar.bz2
Fix compilation error in _PyBytesWriter_WriteBytes() on Windows
Diffstat (limited to 'Objects/bytesobject.c')
-rw-r--r--Objects/bytesobject.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
index 532051e..e7ab503 100644
--- a/Objects/bytesobject.c
+++ b/Objects/bytesobject.c
@@ -4042,9 +4042,11 @@ _PyBytesWriter_Finish(_PyBytesWriter *writer, void *str)
}
void*
-_PyBytesWriter_WriteBytes(_PyBytesWriter *writer, void *str,
+_PyBytesWriter_WriteBytes(_PyBytesWriter *writer, void *ptr,
const void *bytes, Py_ssize_t size)
{
+ char *str = (char *)ptr;
+
str = _PyBytesWriter_Prepare(writer, str, size);
if (str == NULL)
return NULL;