summaryrefslogtreecommitdiff
path: root/Parser
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-12-25 19:53:18 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2015-12-25 19:53:18 +0200
commitd1ba93f9a6a441ac31c5fd1890ce730b9e6d330d (patch)
tree8b977eca9b539fb4d1064d92cc2a405fab36e75d /Parser
parent5f0e32baa674d4563910e0b58f1563ab0b2aa52a (diff)
downloadcpython-d1ba93f9a6a441ac31c5fd1890ce730b9e6d330d.tar.gz
Issue #25923: Added the const qualifier to static constant arrays.
Diffstat (limited to 'Parser')
-rw-r--r--Parser/parsetok.c4
-rw-r--r--Parser/pgen.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/Parser/parsetok.c b/Parser/parsetok.c
index 629dee565c..ebe9495184 100644
--- a/Parser/parsetok.c
+++ b/Parser/parsetok.c
@@ -161,10 +161,10 @@ PyParser_ParseFileFlagsEx(FILE *fp, const char *filename,
#ifdef PY_PARSER_REQUIRES_FUTURE_KEYWORD
#if 0
-static char with_msg[] =
+static const char with_msg[] =
"%s:%d: Warning: 'with' will become a reserved keyword in Python 2.6\n";
-static char as_msg[] =
+static const char as_msg[] =
"%s:%d: Warning: 'as' will become a reserved keyword in Python 2.6\n";
static void
diff --git a/Parser/pgen.c b/Parser/pgen.c
index f3031aea0b..6ecb311602 100644
--- a/Parser/pgen.c
+++ b/Parser/pgen.c
@@ -134,7 +134,7 @@ addnfa(nfagrammar *gr, char *name)
#ifdef Py_DEBUG
-static char REQNFMT[] = "metacompile: less than %d children\n";
+static const char REQNFMT[] = "metacompile: less than %d children\n";
#define REQN(i, count) do { \
if (i < count) { \