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

Function _array__reserve

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

This is not what you're looking for, see `array_reserve`.

Source from the content-addressed store, hash-verified

181
182/// This is not what you're looking for, see `array_reserve`.
183static inline void _array__reserve(Array *self, size_t element_size, uint32_t new_capacity) {
184 if (new_capacity > self->capacity) {
185 if (self->contents) {
186 self->contents = ts_realloc(self->contents, new_capacity * element_size);
187 } else {
188 self->contents = ts_malloc(new_capacity * element_size);
189 }
190 self->capacity = new_capacity;
191 }
192}
193
194/// This is not what you're looking for, see `array_assign`.
195static inline void _array__assign(Array *self, const Array *other, size_t element_size) {

Callers 3

_array__assignFunction · 0.70
_array__growFunction · 0.70
_array__spliceFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected