MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / handle_luainit

Function handle_luainit

src/Chain/libraries/glua/lua.cpp:533–545  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

pmainFunction · 0.70

Calls 2

dofileFunction · 0.70
dostringFunction · 0.70

Tested by

no test coverage detected