From: Victor Stinner Date: Mon, 12 Oct 2015 11:57:47 +0000 (+0200) Subject: Fix compilation error in _PyBytesWriter_WriteBytes() on Windows X-Git-Tag: v3.6.0a1~1242 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e9aa5950bb6ae7eab553e915402eddcb610565e4;p=thirdparty%2FPython%2Fcpython.git Fix compilation error in _PyBytesWriter_WriteBytes() on Windows --- diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index 532051e2424b..e7ab503047be 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;