MCPcopy Create free account
hub / github.com/commonmark/cmark / cmark_strbuf_init

Function cmark_strbuf_init

src/buffer.c:22–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20#endif
21
22void cmark_strbuf_init(cmark_mem *mem, cmark_strbuf *buf,
23 bufsize_t initial_size) {
24 buf->mem = mem;
25 buf->asize = 0;
26 buf->size = 0;
27 buf->ptr = cmark_strbuf__initbuf;
28
29 if (initial_size > 0)
30 cmark_strbuf_grow(buf, initial_size);
31}
32
33static inline void S_strbuf_grow_by(cmark_strbuf *buf, bufsize_t add) {
34 cmark_strbuf_grow(buf, buf->size + add);

Callers 3

cmark_strbuf_freeFunction · 0.85
cmark_strbuf_detachFunction · 0.85

Calls 1

cmark_strbuf_growFunction · 0.85

Tested by

no test coverage detected