MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / loader_Lua

Function loader_Lua

deps/lua/src/loadlib.c:380–388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

378
379
380static int loader_Lua (lua_State *L) {
381 const char *filename;
382 const char *name = luaL_checkstring(L, 1);
383 filename = findfile(L, name, "path");
384 if (filename == NULL) return 1; /* library not found in this path */
385 if (luaL_loadfile(L, filename) != 0)
386 loaderror(L, filename);
387 return 1; /* library loaded successfully */
388}
389
390
391static const char *mkfuncname (lua_State *L, const char *modname) {

Callers

nothing calls this directly

Calls 3

findfileFunction · 0.85
luaL_loadfileFunction · 0.85
loaderrorFunction · 0.85

Tested by

no test coverage detected