MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / handle_luainit

Function handle_luainit

extlibs/lua/src/lua.c:327–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

325
326
327static int handle_luainit (lua_State *L) {
328 const char *name = "=" LUA_INITVARVERSION;
329 const char *init = getenv(name + 1);
330 if (init == NULL) {
331 name = "=" LUA_INIT_VAR;
332 init = getenv(name + 1); /* try alternative name */
333 }
334 if (init == NULL) return LUA_OK;
335 else if (init[0] == '@')
336 return dofile(L, init+1);
337 else
338 return dostring(L, init, name);
339}
340
341
342/*

Callers 1

pmainFunction · 0.85

Calls 2

dofileFunction · 0.85
dostringFunction · 0.85

Tested by

no test coverage detected