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

Function checkclib

third-party/lua-5.4.6/src/loadlib.c:326–333  ·  view source on GitHub ↗

** return registry.CLIBS[path] */

Source from the content-addressed store, hash-verified

324** return registry.CLIBS[path]
325*/
326static void *checkclib (lua_State *L, const char *path) {
327 void *plib;
328 lua_getfield(L, LUA_REGISTRYINDEX, CLIBS);
329 lua_getfield(L, -1, path);
330 plib = lua_touserdata(L, -1); /* plib = CLIBS[path] */
331 lua_pop(L, 2); /* pop CLIBS table and 'plib' */
332 return plib;
333}
334
335
336/*

Callers 1

lookforfuncFunction · 0.70

Calls 2

lua_getfieldFunction · 0.70
lua_touserdataFunction · 0.70

Tested by

no test coverage detected