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

Function handlers

error/error.c:12–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10__thread struct hc_error *hc_error = NULL;
11
12static struct hc_vector *handlers() {
13 static bool init = true;
14 static __thread struct hc_vector handlers;
15
16 if (init) {
17 hc_vector_init(&handlers, &hc_malloc_default, sizeof(jmp_buf));
18 init = false;
19 }
20
21 return &handlers;
22}
23
24void hc_catch_push(jmp_buf h) {
25 memcpy((jmp_buf *)hc_vector_push(handlers()), h, sizeof(jmp_buf));

Callers 4

hc_catch_pushFunction · 0.85
hc_catch_popFunction · 0.85
hc_errors_deinitFunction · 0.85
_hc_throwFunction · 0.85

Calls 1

hc_vector_initFunction · 0.85

Tested by

no test coverage detected