From 41b8c5b3a4c46d3c2beb1dae6e170c295c19b198 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 23 Jun 2016 13:28:41 -0700 Subject: Removed check for same mem allocator in S_can_contain. This is too strict, as it prevents the use of dynamically loaded extensions: see https://github.com/jgm/cmark/pull/123#discussion_r67231518. Documented in man page and public header that one should use the same memory allocator for every node in a tree. --- src/cmark.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/cmark.h') diff --git a/src/cmark.h b/src/cmark.h index 45d7bc3..3543c82 100644 --- a/src/cmark.h +++ b/src/cmark.h @@ -112,7 +112,8 @@ typedef struct cmark_mem { CMARK_EXPORT cmark_node *cmark_node_new(cmark_node_type type); /** Same as `cmark_node_new`, but explicitly listing the memory - * allocator used to allocate the node + * allocator used to allocate the node. Note: be sure to use the same + * allocator for every node in a tree, or bad things can happen. */ CMARK_EXPORT cmark_node *cmark_node_new_with_mem(cmark_node_type type, cmark_mem *mem); -- cgit v1.2.3