MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / checkclib

Function checkclib

libraries/AP_Scripting/lua/src/loadlib.c:320–327  ·  view source on GitHub ↗

** return registry.CLIBS[path] */

Source from the content-addressed store, hash-verified

318** return registry.CLIBS[path]
319*/
320static void *checkclib (lua_State *L, const char *path) {
321 void *plib;
322 lua_rawgetp(L, LUA_REGISTRYINDEX, &CLIBS);
323 lua_getfield(L, -1, path);
324 plib = lua_touserdata(L, -1); /* plib = CLIBS[path] */
325 lua_pop(L, 2); /* pop CLIBS table and 'plib' */
326 return plib;
327}
328
329
330/*

Callers 1

lookforfuncFunction · 0.85

Calls 3

lua_rawgetpFunction · 0.85
lua_getfieldFunction · 0.85
lua_touserdataFunction · 0.85

Tested by

no test coverage detected