This is not what you're looking for, see `array_push` or `array_grow_by`.
| 246 | |
| 247 | /// This is not what you're looking for, see `array_push` or `array_grow_by`. |
| 248 | static inline void *_array__grow(void *contents, uint32_t size, uint32_t *capacity, |
| 249 | uint32_t count, size_t element_size) { |
| 250 | void *new_contents = contents; |
| 251 | uint32_t new_size = size + count; |
| 252 | if (new_size > *capacity) { |
| 253 | uint32_t new_capacity = *capacity * 2; |
| 254 | if (new_capacity < 8) new_capacity = 8; |
| 255 | if (new_capacity < new_size) new_capacity = new_size; |
| 256 | new_contents = _array__reserve(contents, capacity, element_size, new_capacity); |
| 257 | } |
| 258 | return new_contents; |
| 259 | } |
| 260 | |
| 261 | /// This is not what you're looking for, see `array_splice`. |
| 262 | static inline void *_array__splice(void *self_contents, uint32_t *size, uint32_t *capacity, |
nothing calls this directly
no test coverage detected