** __gc tag method: calls library's `ll_unloadlib' function with the lib ** handle */
| 299 | ** handle |
| 300 | */ |
| 301 | static int gctm (lua_State *L) { |
| 302 | void **lib = (void **)luaL_checkudata(L, 1, "_LOADLIB"); |
| 303 | if (*lib) ll_unloadlib(*lib); |
| 304 | *lib = NULL; /* mark library as closed */ |
| 305 | return 0; |
| 306 | } |
| 307 | |
| 308 | |
| 309 | static int ll_loadfunc (lua_State *L, const char *path, const char *sym) { |
nothing calls this directly
no test coverage detected