MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / ll_seeall

Function ll_seeall

lua/loadlib.c:577–587  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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