| 135 | } |
| 136 | |
| 137 | void *hc_dlib_find(const struct hc_dlib *lib, const char *s) { |
| 138 | dlerror(); |
| 139 | void *v = dlsym(lib->handle, s); |
| 140 | char *e = dlerror(); |
| 141 | |
| 142 | if (e) { |
| 143 | hc_throw("Symbol '%s' not found: %s", e); |
| 144 | } |
| 145 | |
| 146 | return v; |
| 147 | } |
| 148 | |
| 149 | char *hc_vsprintf(const char *format, va_list args) { |
| 150 | va_list tmp_args; |
no outgoing calls