diff options
author | tyomitch <tyomitch@gmail.com> | 2019-04-23 09:29:57 (GMT) |
---|---|---|
committer | Inada Naoki <songofacandy@gmail.com> | 2019-04-23 09:29:57 (GMT) |
commit | 84b4784f12d4b8aab2b4cc5a4f5b64f45ec3e5d4 (patch) | |
tree | b58b4e4464c3ecbf1256f6263b2175d5a06bfd2d /Include/grammar.h | |
parent | fb8c7d53326d137785ca311bfc48c8284da46770 (diff) | |
download | cpython-84b4784f12d4b8aab2b4cc5a4f5b64f45ec3e5d4.zip cpython-84b4784f12d4b8aab2b4cc5a4f5b64f45ec3e5d4.tar.gz cpython-84b4784f12d4b8aab2b4cc5a4f5b64f45ec3e5d4.tar.bz2 |
use `const` in graminit.c (GH-12713)
Diffstat (limited to 'Include/grammar.h')
-rw-r--r-- | Include/grammar.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Include/grammar.h b/Include/grammar.h index 7a6182b..faccae4 100644 --- a/Include/grammar.h +++ b/Include/grammar.h @@ -13,7 +13,7 @@ extern "C" { typedef struct { int lb_type; - char *lb_str; + const char *lb_str; } label; #define EMPTY 0 /* Label number 0 is by definition the empty label */ @@ -22,7 +22,7 @@ typedef struct { typedef struct { int ll_nlabels; - label *ll_label; + const label *ll_label; } labellist; /* An arc from one state to another */ @@ -36,7 +36,7 @@ typedef struct { typedef struct { int s_narcs; - arc *s_arc; /* Array of arcs */ + const arc *s_arc; /* Array of arcs */ /* Optional accelerators */ int s_lower; /* Lowest label index */ @@ -59,8 +59,8 @@ typedef struct { typedef struct { int g_ndfas; - dfa *g_dfa; /* Array of DFAs */ - labellist g_ll; + const dfa *g_dfa; /* Array of DFAs */ + const labellist g_ll; int g_start; /* Start symbol of the grammar */ int g_accel; /* Set if accelerators present */ } grammar; |