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

Function luaopen_base

extlibs/lua/src/lbaselib.c:515–526  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

513
514
515LUAMOD_API int luaopen_base (lua_State *L) {
516 /* open lib into global table */
517 lua_pushglobaltable(L);
518 luaL_setfuncs(L, base_funcs, 0);
519 /* set global _G */
520 lua_pushvalue(L, -1);
521 lua_setfield(L, -2, LUA_GNAME);
522 /* set global _VERSION */
523 lua_pushliteral(L, LUA_VERSION);
524 lua_setfield(L, -2, "_VERSION");
525 return 1;
526}
527

Callers

nothing calls this directly

Calls 3

lua_pushvalueFunction · 0.85
lua_setfieldFunction · 0.85
luaL_setfuncsFunction · 0.70

Tested by

no test coverage detected