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

Function loadfunc

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

Source from the content-addressed store, hash-verified

417
418
419static int loadfunc (lua_State *L, const char *filename, const char *modname) {
420 const char *funcname;
421 const char *mark;
422 modname = luaL_gsub(L, modname, ".", LUA_OFSEP);
423 mark = strchr(modname, *LUA_IGMARK);
424 if (mark) {
425 int stat;
426 funcname = lua_pushlstring(L, modname, mark - modname);
427 funcname = lua_pushfstring(L, LUA_POF"%s", funcname);
428 stat = ll_loadfunc(L, filename, funcname);
429 if (stat != ERRFUNC) return stat;
430 modname = mark + 1; /* else go ahead and try old-style name */
431 }
432 funcname = lua_pushfstring(L, LUA_POF"%s", modname);
433 return ll_loadfunc(L, filename, funcname);
434}
435
436
437static int searcher_C (lua_State *L) {

Callers 2

searcher_CFunction · 0.70
searcher_CrootFunction · 0.70

Calls 4

luaL_gsubFunction · 0.70
lua_pushlstringFunction · 0.70
lua_pushfstringFunction · 0.70
ll_loadfuncFunction · 0.70

Tested by

no test coverage detected