diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-06-16 14:15:32 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-06-16 14:24:59 -0700 |
commit | 76ed9a65b03b2477628c0bf72855cc4686642574 (patch) | |
tree | cf000bce51e173288e71775f78a1a1ba47b8d388 | |
parent | 9f1bb45d9b1a43daa229714d4eb83e981a187f92 (diff) |
Mark entity data structures as const.
-rw-r--r-- | src/entities.h | 4 | ||||
-rw-r--r-- | tools/make_entities_h.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/entities.h b/src/entities.h index 28e2ccd..2637c7f 100644 --- a/src/entities.h +++ b/src/entities.h @@ -15,7 +15,7 @@ struct cmark_entity_node { #define CMARK_ENTITY_MIN_LENGTH 2 #define CMARK_ENTITY_MAX_LENGTH 31 -static struct cmark_entity_node cmark_entities[] = { +static const struct cmark_entity_node cmark_entities[] = { {132476, (unsigned char*)"\342\203\233", -1, -1}, /* ⃛ */ {5862221, (unsigned char*)"\342\205\205", 0, -1}, /* ⅅ */ {5862336, (unsigned char*)"\76", 1, 3}, /* > */ @@ -2143,7 +2143,7 @@ static struct cmark_entity_node cmark_entities[] = { {4287033576, (unsigned char*)"\342\252\224", -1, -1}, /* ⪔ */ }; -static int cmark_entities_root = 1062; +static const int cmark_entities_root = 1062; #ifdef __cplusplus } diff --git a/tools/make_entities_h.py b/tools/make_entities_h.py index 90831a9..a993246 100644 --- a/tools/make_entities_h.py +++ b/tools/make_entities_h.py @@ -89,14 +89,14 @@ struct cmark_entity_node { #define CMARK_ENTITY_MAX_LENGTH 31 """) -print("static struct cmark_entity_node cmark_entities[] = {"); +print("static const struct cmark_entity_node cmark_entities[] = {"); for line in lines: print(line); print("};\n"); -print("static int cmark_entities_root = " + str(mid) + ";"); +print("static const int cmark_entities_root = " + str(mid) + ";"); print(""" #ifdef __cplusplus |