MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / gctm

Function gctm

3rd/lua-5.4.3/src/loadlib.c:363–371  ·  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

361** handles in list CLIBS
362*/
363static int gctm (lua_State *L) {
364 lua_Integer n = luaL_len(L, 1);
365 for (; n >= 1; n--) { /* for each handle, in reverse order */
366 lua_rawgeti(L, 1, n); /* get handle CLIBS[n] */
367 lsys_unloadlib(lua_touserdata(L, -1));
368 lua_pop(L, 1); /* pop handle */
369 }
370 return 0;
371}
372
373
374

Callers

nothing calls this directly

Calls 4

luaL_lenFunction · 0.85
lua_rawgetiFunction · 0.85
lsys_unloadlibFunction · 0.85
lua_touserdataFunction · 0.85

Tested by

no test coverage detected