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

Function checkclib

3rd/lua-5.4.3/src/loadlib.c:335–342  ·  view source on GitHub ↗

** return registry.CLIBS[path] */

Source from the content-addressed store, hash-verified

333** return registry.CLIBS[path]
334*/
335static void *checkclib (lua_State *L, const char *path) {
336 void *plib;
337 lua_getfield(L, LUA_REGISTRYINDEX, CLIBS);
338 lua_getfield(L, -1, path);
339 plib = lua_touserdata(L, -1); /* plib = CLIBS[path] */
340 lua_pop(L, 2); /* pop CLIBS table and 'plib' */
341 return plib;
342}
343
344
345/*

Callers 1

lookforfuncFunction · 0.85

Calls 2

lua_getfieldFunction · 0.85
lua_touserdataFunction · 0.85

Tested by

no test coverage detected