[3.9] bpo-41215: Don't use NULL by default in the PEG parser keyword list (GH-21355) (GH-21356)
(cherry picked from commit 39e76c0fb07e20acad454deb86a0457b279884a9)
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
Automerge-Triggered-By: @lysnikolaou
diff --git a/Parser/pegen/parse.c b/Parser/pegen/parse.c
index 9d3ac57..d9dd23c 100644
--- a/Parser/pegen/parse.c
+++ b/Parser/pegen/parse.c
@@ -9,8 +9,8 @@
#endif
static const int n_keyword_lists = 15;
static KeywordToken *reserved_keywords[] = {
- NULL,
- NULL,
+ (KeywordToken[]) {{NULL, -1}},
+ (KeywordToken[]) {{NULL, -1}},
(KeywordToken[]) {
{"if", 510},
{"in", 518},
@@ -65,11 +65,11 @@
{"nonlocal", 509},
{NULL, -1},
},
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
+ (KeywordToken[]) {{NULL, -1}},
+ (KeywordToken[]) {{NULL, -1}},
+ (KeywordToken[]) {{NULL, -1}},
+ (KeywordToken[]) {{NULL, -1}},
+ (KeywordToken[]) {{NULL, -1}},
(KeywordToken[]) {
{"__peg_parser__", 531},
{NULL, -1},