MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / _array__grow

Function _array__grow

codegraph-kernel/grammars/lua/tree_sitter/array.h:209–217  ·  view source on GitHub ↗

This is not what you're looking for, see `array_push` or `array_grow_by`.

Source from the content-addressed store, hash-verified

207
208/// This is not what you're looking for, see `array_push` or `array_grow_by`.
209static inline void _array__grow(Array *self, uint32_t count, size_t element_size) {
210 uint32_t new_size = self->size + count;
211 if (new_size > self->capacity) {
212 uint32_t new_capacity = self->capacity * 2;
213 if (new_capacity < 8) new_capacity = 8;
214 if (new_capacity < new_size) new_capacity = new_size;
215 _array__reserve(self, element_size, new_capacity);
216 }
217}
218
219/// This is not what you're looking for, see `array_splice`.
220static inline void _array__splice(Array *self, size_t element_size,

Callers

nothing calls this directly

Calls 1

_array__reserveFunction · 0.70

Tested by

no test coverage detected