MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / gctm

Function gctm

source/extern/lua/loadlib.c:345–353  ·  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

343** handles in list CLIBS
344*/
345static int gctm (lua_State *L) {
346 lua_Integer n = luaL_len(L, 1);
347 for (; n >= 1; n--) { /* for each handle, in reverse order */
348 lua_rawgeti(L, 1, n); /* get handle CLIBS[n] */
349 lsys_unloadlib(lua_touserdata(L, -1));
350 lua_pop(L, 1); /* pop handle */
351 }
352 return 0;
353}
354
355
356

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