summaryrefslogtreecommitdiff
path: root/src/inlines.h
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2020-01-18 23:12:37 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2020-01-23 08:25:54 -0800
commitb237924585e61532ada774bf9e70eadff00666dc (patch)
tree4355e86e19736d1eeffd905cdbc2d2b6ea7a6430 /src/inlines.h
parent3acbdf0965859c55fa36c65a4c0e17e92012687c (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/inlines.h')
-rw-r--r--src/inlines.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/inlines.h b/src/inlines.h
index 39d3363..800ed0c 100644
--- a/src/inlines.h
+++ b/src/inlines.h
@@ -1,12 +1,15 @@
#ifndef CMARK_INLINES_H
#define CMARK_INLINES_H
+#include "chunk.h"
+#include "references.h"
+
#ifdef __cplusplus
extern "C" {
#endif
-cmark_chunk cmark_clean_url(cmark_mem *mem, cmark_chunk *url);
-cmark_chunk cmark_clean_title(cmark_mem *mem, cmark_chunk *title);
+unsigned char *cmark_clean_url(cmark_mem *mem, cmark_chunk *url);
+unsigned char *cmark_clean_title(cmark_mem *mem, cmark_chunk *title);
void cmark_parse_inlines(cmark_mem *mem, cmark_node *parent,
cmark_reference_map *refmap, int options);