MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / handle_luainit

Function handle_luainit

lib/lua/src/lua.c:374–386  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

372
373
374static int handle_luainit (lua_State *L) {
375 const char *name = "=" LUA_INITVARVERSION;
376 const char *init = getenv(name + 1);
377 if (init == NULL) {
378 name = "=" LUA_INIT_VAR;
379 init = getenv(name + 1); /* try alternative name */
380 }
381 if (init == NULL) return LUA_OK;
382 else if (init[0] == '@')
383 return dofile(L, init+1);
384 else
385 return dostring(L, init, name);
386}
387
388
389/*

Callers 1

pmainFunction · 0.85

Calls 2

dofileFunction · 0.85
dostringFunction · 0.85

Tested by

no test coverage detected