| 322 | |
| 323 | |
| 324 | static int ll_loadlib (lua_State *L) { |
| 325 | const char *path = luaL_checkstring(L, 1); |
| 326 | const char *init = luaL_checkstring(L, 2); |
| 327 | int stat = ll_loadfunc(L, path, init); |
| 328 | if (stat == 0) /* no errors? */ |
| 329 | return 1; /* return the loaded function */ |
| 330 | else { /* error; error message is on stack top */ |
| 331 | lua_pushnil(L); |
| 332 | lua_insert(L, -2); |
| 333 | lua_pushstring(L, (stat == ERRLIB) ? LIB_FAIL : "init"); |
| 334 | return 3; /* return nil, error message, and where */ |
| 335 | } |
| 336 | } |
| 337 | |
| 338 | |
| 339 |
nothing calls this directly
no test coverage detected