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

Function hoedown_stack_grow

libraries/hoedown/src/stack.c:31–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31void
32hoedown_stack_grow(hoedown_stack *st, size_t neosz)
33{
34 assert(st);
35
36 if (st->asize >= neosz)
37 return;
38
39 st->item = hoedown_realloc(st->item, neosz * sizeof(void *));
40 memset(st->item + st->asize, 0x0, (neosz - st->asize) * sizeof(void *));
41
42 st->asize = neosz;
43
44 if (st->size > neosz)
45 st->size = neosz;
46}
47
48void
49hoedown_stack_push(hoedown_stack *st, void *item)

Callers 2

hoedown_stack_initFunction · 0.85
hoedown_stack_pushFunction · 0.85

Calls 1

hoedown_reallocFunction · 0.85

Tested by

no test coverage detected