| 10 | } |
| 11 | |
| 12 | struct hc_vector *hc_vector_init(struct hc_vector *v, |
| 13 | struct hc_malloc *malloc, |
| 14 | const size_t item_size) { |
| 15 | v->malloc = malloc; |
| 16 | v->item_size = item_size; |
| 17 | v->capacity = 0; |
| 18 | v->length = 0; |
| 19 | v->start = v->end = NULL; |
| 20 | return v; |
| 21 | } |
| 22 | |
| 23 | void hc_vector_deinit(struct hc_vector *v) { |
| 24 | if (v->start) { hc_release(v->malloc, v->start); } |
no outgoing calls