MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / loader_C

Function loader_C

deps/lua/src/loadlib.c:402–411  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

400
401
402static int loader_C (lua_State *L) {
403 const char *funcname;
404 const char *name = luaL_checkstring(L, 1);
405 const char *filename = findfile(L, name, "cpath");
406 if (filename == NULL) return 1; /* library not found in this path */
407 funcname = mkfuncname(L, name);
408 if (ll_loadfunc(L, filename, funcname) != 0)
409 loaderror(L, filename);
410 return 1; /* library loaded successfully */
411}
412
413
414static int loader_Croot (lua_State *L) {

Callers

nothing calls this directly

Calls 4

findfileFunction · 0.85
mkfuncnameFunction · 0.85
ll_loadfuncFunction · 0.85
loaderrorFunction · 0.85

Tested by

no test coverage detected