summaryrefslogtreecommitdiff
path: root/src/buffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer.h')
-rw-r--r--src/buffer.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/buffer.h b/src/buffer.h
index 89328ac..96b2704 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -7,6 +7,7 @@
#include <limits.h>
#include <stdbool.h>
#include "config.h"
+#include "cmark.h"
#ifdef __cplusplus
extern "C" {
@@ -15,22 +16,22 @@ extern "C" {
typedef ssize_t bufsize_t;
typedef struct {
+ cmark_mem *mem;
unsigned char *ptr;
bufsize_t asize, size;
} cmark_strbuf;
extern unsigned char cmark_strbuf__initbuf[];
-#define GH_BUF_INIT \
- { cmark_strbuf__initbuf, 0, 0 }
+#define CMARK_BUF_INIT(mem) {mem, cmark_strbuf__initbuf, 0, 0}
/**
* Initialize a cmark_strbuf structure.
*
- * For the cases where GH_BUF_INIT cannot be used to do static
+ * For the cases where CMARK_BUF_INIT cannot be used to do static
* initialization.
*/
-void cmark_strbuf_init(cmark_strbuf *buf, bufsize_t initial_size);
+void cmark_strbuf_init(cmark_mem *mem, cmark_strbuf *buf, bufsize_t initial_size);
/**
* Grow the buffer to hold at least `target_size` bytes.