[Python-checkins] cpython: make _PyParser_TokenNames const

benjamin.peterson python-checkins at python.org
Wed Oct 24 17:22:02 CEST 2012


http://hg.python.org/cpython/rev/7e0e15d9957f
changeset:   79925:7e0e15d9957f
user:        Benjamin Peterson <benjamin at python.org>
date:        Wed Oct 24 08:21:52 2012 -0700
summary:
  make _PyParser_TokenNames const

files:
  Include/token.h    |  2 +-
  Parser/tokenizer.c |  2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/Include/token.h b/Include/token.h
--- a/Include/token.h
+++ b/Include/token.h
@@ -75,7 +75,7 @@
 #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
--- a/Parser/tokenizer.c
+++ b/Parser/tokenizer.c
@@ -47,7 +47,7 @@
 
 /* Token names */
 
-char *_PyParser_TokenNames[] = {
+const char *_PyParser_TokenNames[] = {
     "ENDMARKER",
     "NAME",
     "NUMBER",

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list