bpo-39605: Remove a cast that causes a warning. (GH-18473)
(cherry picked from commit 95905ce0f41fd42eb1ef60ddb83f057401c3d52f)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 8ba379e..4c2b42f 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -3353,7 +3353,7 @@
/* Decode via the codec registry */
buffer = NULL;
- if (PyBuffer_FillInfo(&info, NULL, (const void *)s, size, 1, PyBUF_FULL_RO) < 0)
+ if (PyBuffer_FillInfo(&info, NULL, (void *)s, size, 1, PyBUF_FULL_RO) < 0)
goto onError;
buffer = PyMemoryView_FromBuffer(&info);
if (buffer == NULL)