This is not what you're looking for, see `array_reserve`.
| 181 | |
| 182 | /// This is not what you're looking for, see `array_reserve`. |
| 183 | static 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`. |
| 195 | static inline void _array__assign(Array *self, const Array *other, size_t element_size) { |
no outgoing calls
no test coverage detected