MCPcopy Create free account
hub / github.com/MihailRis/voxelcore / remove_lib_funcs

Function remove_lib_funcs

src/logic/scripting/lua/lua_engine.cpp:19–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17}
18
19static void remove_lib_funcs(lua::State* L, const char* libname, const char* funcs[]) {
20 if (getglobal(L, libname)) {
21 for (uint i = 0; funcs[i]; i++) {
22 pushnil(L);
23 setfield(L, funcs[i], -2);
24 }
25 pop(L);
26 }
27}
28
29static void create_libs(lua::State* L) {
30 openlib(L, "audio", audiolib);

Callers 1

initializeMethod · 0.85

Calls 4

getglobalFunction · 0.85
pushnilFunction · 0.85
setfieldFunction · 0.85
popFunction · 0.85

Tested by

no test coverage detected