| 13075 | |
| 13076 | |
| 13077 | static int ll_loadlib (lua_State *L) { |
| 13078 | const char *path = luaL_checkstring(L, 1); |
| 13079 | const char *init = luaL_checkstring(L, 2); |
| 13080 | int stat = ll_loadfunc(L, path, init); |
| 13081 | if (stat == 0) /* no errors? */ |
| 13082 | return 1; /* return the loaded function */ |
| 13083 | else { /* error; error message is on stack top */ |
| 13084 | lua_pushnil(L); |
| 13085 | lua_insert(L, -2); |
| 13086 | lua_pushstring(L, (stat == ERRLIB) ? LIB_FAIL : "init"); |
| 13087 | return 3; /* return nil, error message, and where */ |
| 13088 | } |
| 13089 | } |
| 13090 | |
| 13091 | |
| 13092 |
nothing calls this directly
no test coverage detected