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

Function handle_luainit

third-party/lua-5.3.5/src/lua.c:535–547  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

533
534
535static int handle_luainit (lua_State *L) {
536 const char *name = "=" LUA_INITVARVERSION;
537 const char *init = getenv(name + 1);
538 if (init == NULL) {
539 name = "=" LUA_INIT_VAR;
540 init = getenv(name + 1); /* try alternative name */
541 }
542 if (init == NULL) return LUA_OK;
543 else if (init[0] == '@')
544 return dofile(L, init+1);
545 else
546 return dostring(L, init, name);
547}
548
549
550/*

Callers 1

pmainFunction · 0.70

Calls 2

dofileFunction · 0.70
dostringFunction · 0.70

Tested by

no test coverage detected