| 97 | |
| 98 | |
| 99 | static void limitMembers(lua_State* L, const char* table, |
| 100 | const std::vector<std::string>& functions) { |
| 101 | lua_newtable(L); |
| 102 | const int nt = lua_gettop(L); // new table |
| 103 | lua_getglobal(L, table); |
| 104 | for (size_t i = 0; i < functions.size(); i++) { |
| 105 | lua_getfield(L, -1, functions[i].c_str()); |
| 106 | lua_setfield(L, nt, functions[i].c_str()); |
| 107 | } |
| 108 | lua_pop(L, 1); |
| 109 | lua_setglobal(L, table); |
| 110 | } |
| 111 | |
| 112 | |
| 113 | static void setupCallInMaps() { |
no test coverage detected