MCPcopy Create free account
hub / github.com/DFHack/dfhack / luaopen_base

Function luaopen_base

depends/lua/src/lbaselib.c:486–497  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

484
485
486LUAMOD_API int luaopen_base (lua_State *L) {
487 /* open lib into global table */
488 lua_pushglobaltable(L);
489 luaL_setfuncs(L, base_funcs, 0);
490 /* set global _G */
491 lua_pushvalue(L, -1);
492 lua_setfield(L, -2, "_G");
493 /* set global _VERSION */
494 lua_pushliteral(L, LUA_VERSION);
495 lua_setfield(L, -2, "_VERSION");
496 return 1;
497}
498

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