MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / checkclib

Function checkclib

lib/lua/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.85

Calls 2

lua_getfieldFunction · 0.85
lua_touserdataFunction · 0.85

Tested by

no test coverage detected