summaryrefslogtreecommitdiff
path: root/src/node.c
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2020-01-19 13:45:40 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2020-01-23 08:25:54 -0800
commit3ef0718f9f4c9dea5014a8a0e9a67e2366b9374f (patch)
treea5af5d11074d28c2d1c99d1508b1e3760e82884c /src/node.c
parent68a3f24d93ed63fd1545c691442d69630649eadb (diff)
Improve packing of struct cmark_list
Allows to reduce size of struct cmark_node later.
Diffstat (limited to 'src/node.c')
-rw-r--r--src/node.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/node.c b/src/node.c
index 931bd46..fd6526c 100644
--- a/src/node.c
+++ b/src/node.c
@@ -371,7 +371,7 @@ cmark_list_type cmark_node_get_list_type(cmark_node *node) {
}
if (node->type == CMARK_NODE_LIST) {
- return node->as.list.list_type;
+ return (cmark_list_type)node->as.list.list_type;
} else {
return CMARK_NO_LIST;
}
@@ -387,7 +387,7 @@ int cmark_node_set_list_type(cmark_node *node, cmark_list_type type) {
}
if (node->type == CMARK_NODE_LIST) {
- node->as.list.list_type = type;
+ node->as.list.list_type = (unsigned char)type;
return 1;
} else {
return 0;
@@ -400,7 +400,7 @@ cmark_delim_type cmark_node_get_list_delim(cmark_node *node) {
}
if (node->type == CMARK_NODE_LIST) {
- return node->as.list.delimiter;
+ return (cmark_delim_type)node->as.list.delimiter;
} else {
return CMARK_NO_DELIM;
}
@@ -416,7 +416,7 @@ int cmark_node_set_list_delim(cmark_node *node, cmark_delim_type delim) {
}
if (node->type == CMARK_NODE_LIST) {
- node->as.list.delimiter = delim;
+ node->as.list.delimiter = (unsigned char)delim;
return 1;
} else {
return 0;