summaryrefslogtreecommitdiff
path: root/src/node.h
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2016-05-27 16:55:16 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2016-06-06 15:39:05 -0700
commit25429c96f6554ffac415f9d865934b1183f3398e (patch)
tree84d4eef404e99ff9e88d96a86d348a863d7c466f /src/node.h
parentab6c81b960e86b26c7fda366f51ff29d1683a555 (diff)
cmark: Implement support for custom allocators
Diffstat (limited to 'src/node.h')
-rw-r--r--src/node.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/node.h b/src/node.h
index 397d8e3..1fff990 100644
--- a/src/node.h
+++ b/src/node.h
@@ -48,6 +48,8 @@ typedef struct {
} cmark_custom;
struct cmark_node {
+ cmark_strbuf content;
+
struct cmark_node *next;
struct cmark_node *prev;
struct cmark_node *parent;
@@ -62,11 +64,8 @@ struct cmark_node {
int end_column;
cmark_node_type type;
-
- bool open;
bool last_line_blank;
-
- cmark_strbuf string_content;
+ bool open;
union {
cmark_chunk literal;
@@ -79,6 +78,9 @@ struct cmark_node {
} as;
};
+static CMARK_INLINE cmark_mem *cmark_node_mem(cmark_node *node) {
+ return node->content.mem;
+}
CMARK_EXPORT int cmark_node_check(cmark_node *node, FILE *out);
#ifdef __cplusplus