MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / loader_Lua

Function loader_Lua

Source/Misc/lua/src/lua.c:13148–13156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13146
13147
13148static int loader_Lua (lua_State *L) {
13149const char *filename;
13150const char *name = luaL_checkstring(L, 1);
13151filename = findfile(L, name, "path");
13152if (filename == NULL) return 1; /* library not found in this path */
13153if (luaL_loadfile(L, filename) != 0)
13154loaderror(L, filename);
13155return 1; /* library loaded successfully */
13156}
13157
13158
13159static 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