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