bpo-39943: Add the const qualifier to pointers on non-mutable PyBytes data. (GH-19472)
diff --git a/Modules/readline.c b/Modules/readline.c
index 225d06b..12d6cc7 100644
--- a/Modules/readline.c
+++ b/Modules/readline.c
@@ -234,7 +234,7 @@
write_history_file(PyObject *self, PyObject *args)
{
PyObject *filename_obj = Py_None, *filename_bytes;
- char *filename;
+ const char *filename;
int err;
if (!PyArg_ParseTuple(args, "|O:write_history_file", &filename_obj))
return NULL;
@@ -270,7 +270,7 @@
{
int nelements;
PyObject *filename_obj = Py_None, *filename_bytes;
- char *filename;
+ const char *filename;
int err;
if (!PyArg_ParseTuple(args, "i|O:append_history_file", &nelements, &filename_obj))
return NULL;