From b237924585e61532ada774bf9e70eadff00666dc Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Sat, 18 Jan 2020 23:12:37 +0100 Subject: Use C string instead of chunk for link URL and title Use zero-terminated C strings instead of cmark_chunks without storing the length. This introduces a few additional strlen computations, but overhead should be low. Allows to reduce size of struct cmark_node later. --- 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 327c568..9658d1f 100644 --- a/src/node.h +++ b/src/node.h @@ -37,8 +37,8 @@ typedef struct { } cmark_heading; typedef struct { - cmark_chunk url; - cmark_chunk title; + unsigned char *url; + unsigned char *title; } cmark_link; typedef struct { -- cgit v1.2.3