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

Function checkclib

extlibs/lua/src/loadlib.c:328–335  ·  view source on GitHub ↗

** return registry.CLIBS[path] */

Source from the content-addressed store, hash-verified

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

Callers 1

lookforfuncFunction · 0.85

Calls 2

lua_getfieldFunction · 0.85
lua_touserdataFunction · 0.85

Tested by

no test coverage detected