summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2012-10-24 15:21:52 (GMT)
committerBenjamin Peterson <benjamin@python.org>2012-10-24 15:21:52 (GMT)
commitd0845588b811823a580eb9e775b44af946ba771e (patch)
tree1757b42f7a73e8c0f62f82e1beca9a72b716fc6d
parent5b02d68863cd4baba9b256dd4925f9aeb2804d94 (diff)
downloadcpython-d0845588b811823a580eb9e775b44af946ba771e.zip
cpython-d0845588b811823a580eb9e775b44af946ba771e.tar.gz
cpython-d0845588b811823a580eb9e775b44af946ba771e.tar.bz2
make _PyParser_TokenNames const
-rw-r--r--Include/token.h2
-rw-r--r--Parser/tokenizer.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/Include/token.h b/Include/token.h
index f7f6504..905022b 100644
--- a/Include/token.h
+++ b/Include/token.h
@@ -75,7 +75,7 @@ extern "C" {
#define ISEOF(x) ((x) == ENDMARKER)
-PyAPI_DATA(char *) _PyParser_TokenNames[]; /* Token names */
+PyAPI_DATA(const char *) _PyParser_TokenNames[]; /* Token names */
PyAPI_FUNC(int) PyToken_OneChar(int);
PyAPI_FUNC(int) PyToken_TwoChars(int, int);
PyAPI_FUNC(int) PyToken_ThreeChars(int, int, int);
diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c
index 93a4a5c..c2c182c 100644
--- a/Parser/tokenizer.c
+++ b/Parser/tokenizer.c
@@ -47,7 +47,7 @@ static void tok_backup(struct tok_state *tok, int c);
/* Token names */
-char *_PyParser_TokenNames[] = {
+const char *_PyParser_TokenNames[] = {
"ENDMARKER",
"NAME",
"NUMBER",