Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d084558

Browse files
committed
make _PyParser_TokenNames const
1 parent 5b02d68 commit d084558

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Include/token.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ extern "C" {
7575
#define ISEOF(x) ((x) == ENDMARKER)
7676

7777

78-
PyAPI_DATA(char *) _PyParser_TokenNames[]; /* Token names */
78+
PyAPI_DATA(const char *) _PyParser_TokenNames[]; /* Token names */
7979
PyAPI_FUNC(int) PyToken_OneChar(int);
8080
PyAPI_FUNC(int) PyToken_TwoChars(int, int);
8181
PyAPI_FUNC(int) PyToken_ThreeChars(int, int, int);

Parser/tokenizer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ static void tok_backup(struct tok_state *tok, int c);
4747

4848
/* Token names */
4949

50-
char *_PyParser_TokenNames[] = {
50+
const char *_PyParser_TokenNames[] = {
5151
"ENDMARKER",
5252
"NAME",
5353
"NUMBER",

0 commit comments

Comments
 (0)