diff options
author | Vicent Marti <tanoku@gmail.com> | 2016-05-27 16:55:16 +0200 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2016-06-06 15:39:05 -0700 |
commit | 25429c96f6554ffac415f9d865934b1183f3398e (patch) | |
tree | 84d4eef404e99ff9e88d96a86d348a863d7c466f /src/node.h | |
parent | ab6c81b960e86b26c7fda366f51ff29d1683a555 (diff) |
cmark: Implement support for custom allocators
Diffstat (limited to 'src/node.h')
-rw-r--r-- | src/node.h | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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 |