MCPcopy Create free account
hub / github.com/acl-dev/acl / array_pre_append

Function array_pre_append

lib_fiber/c/src/common/array.c:395–406  ·  view source on GitHub ↗

if you are going to append a known and large number of items, * call this first */

Source from the content-addressed store, hash-verified

393 * call this first
394 */
395void array_pre_append(ARRAY *a, int app_count)
396{
397 const char *name = "array_pre_append";
398
399 if (app_count <= 0) {
400 msg_fatal("%s(%d)->%s: invalid input", __FILE__, __LINE__, name);
401 }
402
403 if (a->count + app_count > a->capacity) {
404 array_grow(a, a->count + app_count);
405 }
406}
407
408void *array_index(const ARRAY *a, int idx)
409{

Callers 1

array_createFunction · 0.85

Calls 2

msg_fatalFunction · 0.85
array_growFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…