| 10 | __thread struct hc_error *hc_error = NULL; |
| 11 | |
| 12 | static 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 | |
| 24 | void hc_catch_push(jmp_buf h) { |
| 25 | memcpy((jmp_buf *)hc_vector_push(handlers()), h, sizeof(jmp_buf)); |
no test coverage detected