summaryrefslogtreecommitdiffstats
path: root/Objects/bytesobject.c
diff options
context:
space:
mode:
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;