summaryrefslogtreecommitdiffstats
path: root/Modules/_io
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-12-25 17:53:18 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-12-25 17:53:18 (GMT)
commit2d06e8445587d9b4d0bf79bdb08ab4743b780249 (patch)
tree9708850d5ae4855466435687cf36f162834d2694 /Modules/_io
parentea8c43152fdaa508ec189062b09a470f1b4ba535 (diff)
downloadcpython-2d06e8445587d9b4d0bf79bdb08ab4743b780249.zip
cpython-2d06e8445587d9b4d0bf79bdb08ab4743b780249.tar.gz
cpython-2d06e8445587d9b4d0bf79bdb08ab4743b780249.tar.bz2
Issue #25923: Added the const qualifier to static constant arrays.
Diffstat (limited to 'Modules/_io')
-rw-r--r--Modules/_io/textio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c
index b232b02..d018623 100644
--- a/Modules/_io/textio.c
+++ b/Modules/_io/textio.c
@@ -772,7 +772,7 @@ typedef struct {
encodefunc_t encodefunc;
} encodefuncentry;
-static encodefuncentry encodefuncs[] = {
+static const encodefuncentry encodefuncs[] = {
{"ascii", (encodefunc_t) ascii_encode},
{"iso8859-1", (encodefunc_t) latin1_encode},
{"utf-8", (encodefunc_t) utf8_encode},
@@ -1022,7 +1022,7 @@ _io_TextIOWrapper___init___impl(textio *self, PyObject *buffer,
goto error;
}
else if (PyUnicode_Check(res)) {
- encodefuncentry *e = encodefuncs;
+ const encodefuncentry *e = encodefuncs;
while (e->name != NULL) {
if (!PyUnicode_CompareWithASCIIString(res, e->name)) {
self->encodefunc = e->encodefunc;