summaryrefslogtreecommitdiffstats
path: root/Modules/_csv.c
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/_csv.c
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/_csv.c')
-rw-r--r--Modules/_csv.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/_csv.c b/Modules/_csv.c
index fe85069..c0be739 100644
--- a/Modules/_csv.c
+++ b/Modules/_csv.c
@@ -60,10 +60,10 @@ typedef enum {
typedef struct {
QuoteStyle style;
- char *name;
+ const char *name;
} StyleDesc;
-static StyleDesc quote_styles[] = {
+static const StyleDesc quote_styles[] = {
{ QUOTE_MINIMAL, "QUOTE_MINIMAL" },
{ QUOTE_ALL, "QUOTE_ALL" },
{ QUOTE_NONNUMERIC, "QUOTE_NONNUMERIC" },
@@ -286,7 +286,7 @@ _set_str(const char *name, PyObject **target, PyObject *src, const char *dflt)
static int
dialect_check_quoting(int quoting)
{
- StyleDesc *qs;
+ const StyleDesc *qs;
for (qs = quote_styles; qs->name; qs++) {
if ((int)qs->style == quoting)
@@ -1633,7 +1633,7 @@ PyMODINIT_FUNC
PyInit__csv(void)
{
PyObject *module;
- StyleDesc *style;
+ const StyleDesc *style;
if (PyType_Ready(&Dialect_Type) < 0)
return NULL;