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

Function hc_vector_push

vector/vector.c:54–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54void *hc_vector_push(struct hc_vector *v) {
55 if (v->length == v->capacity) { grow(v); }
56 void *p = v->end;
57 v->end += v->item_size;
58 v->length++;
59 return p;
60}
61
62void *hc_vector_peek(struct hc_vector *v) {
63 return v->length ? v->end - v->item_size : NULL;

Callers 6

vector_testsFunction · 0.85
hc_getsFunction · 0.85
hc_memory_stream_stringFunction · 0.85
hc_vm_pushFunction · 0.85
hc_vm_emitFunction · 0.85
hc_catch_pushFunction · 0.85

Calls 1

growFunction · 0.85

Tested by 1

vector_testsFunction · 0.68