MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / ll_seeall

Function ll_seeall

deps/lua/src/loadlib.c:572–582  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

570
571
572static int ll_seeall (lua_State *L) {
573 luaL_checktype(L, 1, LUA_TTABLE);
574 if (!lua_getmetatable(L, 1)) {
575 lua_createtable(L, 0, 1); /* create new metatable */
576 lua_pushvalue(L, -1);
577 lua_setmetatable(L, 1);
578 }
579 lua_pushvalue(L, LUA_GLOBALSINDEX);
580 lua_setfield(L, -2, "__index"); /* mt.__index = _G */
581 return 0;
582}
583
584
585/* }====================================================== */

Callers

nothing calls this directly

Calls 6

luaL_checktypeFunction · 0.85
lua_getmetatableFunction · 0.85
lua_createtableFunction · 0.85
lua_pushvalueFunction · 0.85
lua_setmetatableFunction · 0.85
lua_setfieldFunction · 0.85

Tested by

no test coverage detected