diff options
author | Vicent Marti <tanoku@gmail.com> | 2016-05-30 15:49:14 +0200 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2016-06-06 15:39:05 -0700 |
commit | 0c73a05dca8afca491298f3d8f07750e3fcf330d (patch) | |
tree | ea30124002b35c0660bdb56d07422e0669d17f2e /src/node.h | |
parent | 25429c96f6554ffac415f9d865934b1183f3398e (diff) |
node: Memory diet
Save node information in flags instead of using one boolean for each
property.
Diffstat (limited to 'src/node.h')
-rw-r--r-- | src/node.h | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -47,6 +47,11 @@ typedef struct { cmark_chunk on_exit; } cmark_custom; +enum cmark_node__internal_flags { + CMARK_NODE__OPEN = (1 << 0), + CMARK_NODE__LAST_LINE_BLANK = (1 << 1), +}; + struct cmark_node { cmark_strbuf content; @@ -62,10 +67,8 @@ struct cmark_node { int start_column; int end_line; int end_column; - - cmark_node_type type; - bool last_line_blank; - bool open; + uint16_t type; + uint16_t flags; union { cmark_chunk literal; |