MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / limitMembers

Function limitMembers

src/bzflag/HubLua.cpp:99–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97
98
99static 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
113static void setupCallInMaps() {

Callers 1

createLuaMethod · 0.85

Calls 5

c_strMethod · 0.80
lua_gettopFunction · 0.50
lua_getfieldFunction · 0.50
lua_setfieldFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected