[Python-checkins] gh-100940: Change "char *str" to "const char *str" in KeywordToken: It is an immutable string. (#100936)
pablogsal
webhook-mailer at python.org
Wed Jan 18 16:02:54 EST 2023
https://github.com/python/cpython/commit/a1e051a23736fdf3da812363bcaf32e53a294f03
commit: a1e051a23736fdf3da812363bcaf32e53a294f03
branch: main
author: Stepfen Shawn <m18824909883 at 163.com>
committer: pablogsal <Pablogsal at gmail.com>
date: 2023-01-18T21:02:48Z
summary:
gh-100940: Change "char *str" to "const char *str" in KeywordToken: It is an immutable string. (#100936)
files:
M Parser/pegen.h
diff --git a/Parser/pegen.h b/Parser/pegen.h
index d8ac7e8cb918..ad5c97f5f7e5 100644
--- a/Parser/pegen.h
+++ b/Parser/pegen.h
@@ -42,7 +42,7 @@ typedef struct {
} Token;
typedef struct {
- char *str;
+ const char *str;
int type;
} KeywordToken;
More information about the Python-checkins
mailing list