MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / ll_loadlib

Function ll_loadlib

third-party/lua-5.2.4/src/loadlib.c:307–319  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

305
306
307static int ll_loadlib (lua_State *L) {
308 const char *path = luaL_checkstring(L, 1);
309 const char *init = luaL_checkstring(L, 2);
310 int stat = ll_loadfunc(L, path, init);
311 if (stat == 0) /* no errors? */
312 return 1; /* return the loaded function */
313 else { /* error; error message is on stack top */
314 lua_pushnil(L);
315 lua_insert(L, -2);
316 lua_pushstring(L, (stat == ERRLIB) ? LIB_FAIL : "init");
317 return 3; /* return nil, error message, and where */
318 }
319}
320
321
322

Callers

nothing calls this directly

Calls 4

ll_loadfuncFunction · 0.70
lua_pushnilFunction · 0.70
lua_insertFunction · 0.70
lua_pushstringFunction · 0.70

Tested by

no test coverage detected