4 ms·
I think I would make grow() like this to prevent the mistake of accidentally laying out the array fields in the wrong order. void grow(void **ptr, ptrdiff_t
by yobertz 3y ago
I think I would make grow() like this to prevent the mistake of accidentally laying out the array fields in the wrong order.
void grow(void **ptr, ptrdiff_t *cap, ptrdiff_t *len, arena *a) ...
#define push(s, a) ... grow((void **)&s->data, &s->cap, &s->len)
- jstimpfle 3y agoI don't think you're allowed to access/modify a typed pointer through a void **.