From 3acbdf0965859c55fa36c65a4c0e17e92012687c Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Sat, 18 Jan 2020 22:27:13 +0100 Subject: Use C string instead of chunk for code info and literal Use zero-terminated C strings instead of cmark_chunks without storing the length. The length of code literals will be readded in a later commit. strlen overhead for code info should be negligible. Reduces size of struct cmark_node by 8 bytes. --- src/node.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/node.h') diff --git a/src/node.h b/src/node.h index 2163230..327c568 100644 --- a/src/node.h +++ b/src/node.h @@ -23,8 +23,8 @@ typedef struct { } cmark_list; typedef struct { - cmark_chunk info; - cmark_chunk literal; + unsigned char *info; + unsigned char *literal; uint8_t fence_length; uint8_t fence_offset; unsigned char fence_char; -- cgit v1.2.3