if you are going to append a known and large number of items, * call this first */
| 410 | * call this first |
| 411 | */ |
| 412 | void acl_array_pre_append(ACL_ARRAY *a, int app_count) |
| 413 | { |
| 414 | const char *myname = "acl_array_pre_append"; |
| 415 | |
| 416 | if (app_count <= 0) |
| 417 | acl_msg_fatal("%s(%d)->%s: invalid input", |
| 418 | __FILE__, __LINE__, myname); |
| 419 | |
| 420 | if (a->count + app_count > a->capacity) |
| 421 | acl_array_grow(a, a->count + app_count); |
| 422 | } |
| 423 | |
| 424 | void *acl_array_index(const ACL_ARRAY *a, int idx) |
| 425 | { |
no test coverage detected
searching dependent graphs…