MCPcopy Create free account
hub / github.com/BigPig0/RelayLive / gctm

Function gctm

ThirdParty/lua/lua/loadlib.c:305–313  ·  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

303** handles in list CLIBS
304*/
305static int gctm (lua_State *L) {
306 lua_Integer n = luaL_len(L, 1);
307 for (; n >= 1; n--) { /* for each handle, in reverse order */
308 lua_rawgeti(L, 1, n); /* get handle CLIBS[n] */
309 lsys_unloadlib(lua_touserdata(L, -1));
310 lua_pop(L, 1); /* pop handle */
311 }
312 return 0;
313}
314
315
316

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