| 11 | __thread struct hc_slog *_hc_slog = NULL; |
| 12 | |
| 13 | struct hc_slog *hc_slog() { |
| 14 | if (_hc_slog != NULL) { |
| 15 | return _hc_slog; |
| 16 | } |
| 17 | |
| 18 | static __thread bool init = true; |
| 19 | static __thread struct hc_slog_stream s; |
| 20 | |
| 21 | if (init) { |
| 22 | hc_slog_stream_init(&s, hc_stdout()); |
| 23 | init = false; |
| 24 | } |
| 25 | |
| 26 | return &s.slog; |
| 27 | } |
| 28 | |
| 29 | static void field_deinit(struct hc_slog_field *f) { |
| 30 | free(f->name); |
no test coverage detected