MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / gctm

Function gctm

third-party/lua-5.2.4/src/loadlib.c:275–283  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

273** handles in list CLIBS
274*/
275static int gctm (lua_State *L) {
276 int n = luaL_len(L, 1);
277 for (; n >= 1; n--) { /* for each handle, in reverse order */
278 lua_rawgeti(L, 1, n); /* get handle CLIBS[n] */
279 ll_unloadlib(lua_touserdata(L, -1));
280 lua_pop(L, 1); /* pop handle */
281 }
282 return 0;
283}
284
285
286static int ll_loadfunc (lua_State *L, const char *path, const char *sym) {

Callers

nothing calls this directly

Calls 4

luaL_lenFunction · 0.85
lua_rawgetiFunction · 0.70
ll_unloadlibFunction · 0.70
lua_touserdataFunction · 0.70

Tested by

no test coverage detected