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

Function gctm

extlibs/lua/src/loadlib.c:356–364  ·  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

354** handles in list CLIBS
355*/
356static int gctm (lua_State *L) {
357 lua_Integer n = luaL_len(L, 1);
358 for (; n >= 1; n--) { /* for each handle, in reverse order */
359 lua_rawgeti(L, 1, n); /* get handle CLIBS[n] */
360 lsys_unloadlib(lua_touserdata(L, -1));
361 lua_pop(L, 1); /* pop handle */
362 }
363 return 0;
364}
365
366
367

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