bpo-39943: Add the const qualifier to pointers on non-mutable PyBytes data. (GH-19472)

diff --git a/Objects/longobject.c b/Objects/longobject.c
index 5d225cb..a66e1c4 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -5071,7 +5071,7 @@
     if (PyUnicode_Check(x))
         return PyLong_FromUnicodeObject(x, (int)base);
     else if (PyByteArray_Check(x) || PyBytes_Check(x)) {
-        char *string;
+        const char *string;
         if (PyByteArray_Check(x))
             string = PyByteArray_AS_STRING(x);
         else