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

Function luaopen_base

lib/lua/src/lbaselib.c:537–548  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

535
536
537LUAMOD_API int luaopen_base (lua_State *L) {
538 /* open lib into global table */
539 lua_pushglobaltable(L);
540 luaL_setfuncs(L, base_funcs, 0);
541 /* set global _G */
542 lua_pushvalue(L, -1);
543 lua_setfield(L, -2, LUA_GNAME);
544 /* set global _VERSION */
545 lua_pushliteral(L, LUA_VERSION);
546 lua_setfield(L, -2, "_VERSION");
547 return 1;
548}
549

Callers

nothing calls this directly

Calls 3

luaL_setfuncsFunction · 0.85
lua_pushvalueFunction · 0.85
lua_setfieldFunction · 0.85

Tested by

no test coverage detected