diff options
author | John MacFarlane <jgm@berkeley.edu> | 2020-02-09 09:03:16 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2020-02-09 09:03:16 -0800 |
commit | fdbdbf7ecc8597d2b6ae329ecbdabebaf0793fba (patch) | |
tree | 43b5e0669002c9292db7c8249bf9b55a7ada5082 /src/cmark.c | |
parent | 71ef02503ebbd82497920ecc7d580c480865c47a (diff) |
Add cmark_get_default_mem_allocator().
API change: This adds a new exported function in cmark.h.
Closes #330.
Diffstat (limited to 'src/cmark.c')
-rw-r--r-- | src/cmark.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cmark.c b/src/cmark.c index d64237f..8bbca03 100644 --- a/src/cmark.c +++ b/src/cmark.c @@ -30,6 +30,11 @@ static void *xrealloc(void *ptr, size_t size) { cmark_mem DEFAULT_MEM_ALLOCATOR = {xcalloc, xrealloc, free}; +cmark_mem *cmark_get_default_mem_allocator() { + return &DEFAULT_MEM_ALLOCATOR; +} + + char *cmark_markdown_to_html(const char *text, size_t len, int options) { cmark_node *doc; char *result; |