aboutsummaryrefslogtreecommitdiff
path: root/py/lexer.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-05-20 12:38:15 +0100
committerDamien George <damien.p.george@gmail.com>2016-05-20 12:46:20 +0100
commit3ff16ff52e45d4c0bf1df5fa650b72d6d835451b (patch)
treeee959477b44d30e320271d4af728b10bafe3687f /py/lexer.c
parenta0a08b4be1583aa7a4ef33d3b1b0aa6553732eca (diff)
py: Declare constant data as properly constant.
Otherwise some compilers (eg without optimisation) will put this read-only data in RAM instead of ROM.
Diffstat (limited to 'py/lexer.c')
-rw-r--r--py/lexer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/py/lexer.c b/py/lexer.c
index 1639740d3..820f91be7 100644
--- a/py/lexer.c
+++ b/py/lexer.c
@@ -190,7 +190,7 @@ STATIC void indent_pop(mp_lexer_t *lex) {
// c<op> = continue with <op>, if this opchar matches then continue matching
// this means if the start of two ops are the same then they are equal til the last char
-STATIC const char *tok_enc =
+STATIC const char *const tok_enc =
"()[]{},:;@~" // singles
"<e=c<e=" // < <= << <<=
">e=c>e=" // > >= >> >>=
@@ -227,7 +227,7 @@ STATIC const uint8_t tok_enc_kind[] = {
};
// must have the same order as enum in lexer.h
-STATIC const char *tok_kw[] = {
+STATIC const char *const tok_kw[] = {
"False",
"None",
"True",