]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-39605: Remove a cast that causes a warning. (GH-18473)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 12 Feb 2020 03:52:46 +0000 (19:52 -0800)
committerGitHub <noreply@github.com>
Wed, 12 Feb 2020 03:52:46 +0000 (19:52 -0800)
(cherry picked from commit 95905ce0f41fd42eb1ef60ddb83f057401c3d52f)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
Objects/unicodeobject.c

index 8ba379e8887e98f5f9a49fee1be19f62af2ffca5..4c2b42f959b838b56d4dc5f33af012d030fc3a6f 100644 (file)
@@ -3353,7 +3353,7 @@ PyUnicode_Decode(const char *s,
 
     /* 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)