| 689 | |
| 690 | |
| 691 | static int ll_seeall (lua_State *L) { |
| 692 | luaL_checktype(L, 1, LUA_TTABLE); |
| 693 | if (!lua_getmetatable(L, 1)) { |
| 694 | lua_createtable(L, 0, 1); /* create new metatable */ |
| 695 | lua_pushvalue(L, -1); |
| 696 | lua_setmetatable(L, 1); |
| 697 | } |
| 698 | lua_pushglobaltable(L); |
| 699 | lua_setfield(L, -2, "__index"); /* mt.__index = _G */ |
| 700 | return 0; |
| 701 | } |
| 702 | |
| 703 | #endif |
| 704 | /* }====================================================== */ |
nothing calls this directly
no test coverage detected