MCPcopy Create free account
hub / github.com/codr7/hacktical-c / hc_vector_init

Function hc_vector_init

vector/vector.c:12–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10}
11
12struct 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
23void hc_vector_deinit(struct hc_vector *v) {
24 if (v->start) { hc_release(v->malloc, v->start); }

Callers 6

vector_testsFunction · 0.85
hc_getsFunction · 0.85
hc_memory_stream_initFunction · 0.85
hc_set_initFunction · 0.85
hc_vm_initFunction · 0.85
handlersFunction · 0.85

Calls

no outgoing calls

Tested by 1

vector_testsFunction · 0.68