| 13060 | |
| 13061 | |
| 13062 | static int ll_loadfunc (lua_State *L, const char *path, const char *sym) { |
| 13063 | void **reg = ll_register(L, path); |
| 13064 | if (*reg == NULL) *reg = ll_load(L, path); |
| 13065 | if (*reg == NULL) |
| 13066 | return ERRLIB; /* unable to load library */ |
| 13067 | else { |
| 13068 | lua_CFunction f = ll_sym(L, *reg, sym); |
| 13069 | if (f == NULL) |
| 13070 | return ERRFUNC; /* unable to find function */ |
| 13071 | lua_pushcfunction(L, f); |
| 13072 | return 0; /* return function */ |
| 13073 | } |
| 13074 | } |
| 13075 | |
| 13076 | |
| 13077 | static int ll_loadlib (lua_State *L) { |
no test coverage detected