MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / newbuf

Function newbuf

libraries/hoedown/src/document.c:135–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133 ***************************/
134
135static hoedown_buffer *
136newbuf(hoedown_document *doc, int type)
137{
138 static const size_t buf_size[2] = {256, 64};
139 hoedown_buffer *work = NULL;
140 hoedown_stack *pool = &doc->work_bufs[type];
141
142 if (pool->size < pool->asize &&
143 pool->item[pool->size] != NULL) {
144 work = pool->item[pool->size++];
145 work->size = 0;
146 } else {
147 work = hoedown_buffer_new(buf_size[type]);
148 hoedown_stack_push(pool, work);
149 }
150
151 return work;
152}
153
154static void
155popbuf(hoedown_document *doc, int type)

Callers 15

parse_emph1Function · 0.85
parse_emph2Function · 0.85
parse_emph3Function · 0.85
char_quoteFunction · 0.85
char_langle_tagFunction · 0.85
char_autolink_wwwFunction · 0.85
char_autolink_emailFunction · 0.85
char_autolink_urlFunction · 0.85
char_linkFunction · 0.85
char_superscriptFunction · 0.85
parse_blockquoteFunction · 0.85
parse_paragraphFunction · 0.85

Calls 2

hoedown_buffer_newFunction · 0.85
hoedown_stack_pushFunction · 0.85

Tested by

no test coverage detected