| 215 | } |
| 216 | |
| 217 | void acl_stack_prepend(ACL_STACK *s, void *obj) |
| 218 | { |
| 219 | int i; |
| 220 | |
| 221 | if (s == NULL || obj == NULL) |
| 222 | return; |
| 223 | if (s->count >= s->capacity) |
| 224 | stack_grow(s, s->count + 1); |
| 225 | |
| 226 | for (i = s->count; i > 0; i--) |
| 227 | s->items[i] = s->items[i - 1]; |
| 228 | s->items[0] = obj; |
| 229 | s->count++; |
| 230 | } |
| 231 | |
| 232 | void acl_stack_delete(ACL_STACK *s, int position, void (*free_fn)(void *)) |
| 233 | { |
no test coverage detected
searching dependent graphs…