MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / gctm

Function gctm

src/Chain/libraries/glua/loadlib.cpp:311–319  ·  view source on GitHub ↗

** __gc tag method for CLIBS table: calls 'lsys_unloadlib' for all lib ** handles in list CLIBS */

Source from the content-addressed store, hash-verified

309** handles in list CLIBS
310*/
311static int gctm(lua_State *L) {
312 lua_Integer n = luaL_len(L, 1);
313 for (; n >= 1; n--) { /* for each handle, in reverse order */
314 lua_rawgeti(L, 1, n); /* get handle CLIBS[n] */
315 lsys_unloadlib(lua_touserdata(L, -1));
316 lua_pop(L, 1); /* pop handle */
317 }
318 return 0;
319}
320
321
322

Callers

nothing calls this directly

Calls 3

lua_rawgetiFunction · 0.85
lsys_unloadlibFunction · 0.85
lua_touserdataFunction · 0.85

Tested by

no test coverage detected