| 602 | |
| 603 | |
| 604 | static int ll_seeall (lua_State *L) { |
| 605 | luaL_checktype(L, 1, LUA_TTABLE); |
| 606 | if (!lua_getmetatable(L, 1)) { |
| 607 | lua_createtable(L, 0, 1); /* create new metatable */ |
| 608 | lua_pushvalue(L, -1); |
| 609 | lua_setmetatable(L, 1); |
| 610 | } |
| 611 | lua_pushglobaltable(L); |
| 612 | lua_setfield(L, -2, "__index"); /* mt.__index = _G */ |
| 613 | return 0; |
| 614 | } |
| 615 | |
| 616 | #endif |
| 617 | /* }====================================================== */ |
nothing calls this directly
no test coverage detected