Lines Matching defs:buf
47 util_dynarray_init(struct util_dynarray *buf) in util_dynarray_init()
53 util_dynarray_fini(struct util_dynarray *buf) in util_dynarray_fini()
64 util_dynarray_resize(struct util_dynarray *buf, unsigned newsize) in util_dynarray_resize()
82 util_dynarray_grow(struct util_dynarray *buf, int diff) in util_dynarray_grow()
88 util_dynarray_trim(struct util_dynarray *buf) in util_dynarray_trim()
103 #define util_dynarray_append(buf, type, v) do {type __v = (v); memcpy(util_dynarray_grow((buf), siz… argument
104 #define util_dynarray_top_ptr(buf, type) (type*)((char*)(buf)->data + (buf)->size - sizeof(type)) argument
105 #define util_dynarray_top(buf, type) *util_dynarray_top_ptr(buf, type) argument
106 #define util_dynarray_pop_ptr(buf, type) (type*)((char*)(buf)->data + ((buf)->size -= sizeof(type))) argument
107 #define util_dynarray_pop(buf, type) *util_dynarray_pop_ptr(buf, type) argument
108 #define util_dynarray_contains(buf, type) ((buf)->size >= sizeof(type)) argument
109 #define util_dynarray_element(buf, type, idx) ((type*)(buf)->data + (idx)) argument
110 #define util_dynarray_begin(buf) ((buf)->data) argument
111 #define util_dynarray_end(buf) ((void*)util_dynarray_element((buf), char, (buf)->size)) argument