diff options
author | Nick Wellnhofer <wellnhofer@aevum.de> | 2020-01-18 23:12:37 +0100 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2020-01-23 08:25:54 -0800 |
commit | b237924585e61532ada774bf9e70eadff00666dc (patch) | |
tree | 4355e86e19736d1eeffd905cdbc2d2b6ea7a6430 /src/references.c | |
parent | 3acbdf0965859c55fa36c65a4c0e17e92012687c (diff) |
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.
Diffstat (limited to 'src/references.c')
-rw-r--r-- | src/references.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/references.c b/src/references.c index 89f2dc8..f0d871f 100644 --- a/src/references.c +++ b/src/references.c @@ -18,8 +18,8 @@ static void reference_free(cmark_reference_map *map, cmark_reference *ref) { cmark_mem *mem = map->mem; if (ref != NULL) { mem->free(ref->label); - cmark_chunk_free(mem, &ref->url); - cmark_chunk_free(mem, &ref->title); + mem->free(ref->url); + mem->free(ref->title); mem->free(ref); } } |