MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / ll_addtoclib

Function ll_addtoclib

third-party/lua-5.2.4/src/loadlib.c:261–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

259
260
261static void ll_addtoclib (lua_State *L, const char *path, void *plib) {
262 lua_getfield(L, LUA_REGISTRYINDEX, CLIBS);
263 lua_pushlightuserdata(L, plib);
264 lua_pushvalue(L, -1);
265 lua_setfield(L, -3, path); /* CLIBS[path] = plib */
266 lua_rawseti(L, -2, luaL_len(L, -2) + 1); /* CLIBS[#CLIBS + 1] = plib */
267 lua_pop(L, 1); /* pop CLIBS table */
268}
269
270
271/*

Callers 1

ll_loadfuncFunction · 0.85

Calls 6

luaL_lenFunction · 0.85
lua_getfieldFunction · 0.70
lua_pushlightuserdataFunction · 0.70
lua_pushvalueFunction · 0.70
lua_setfieldFunction · 0.70
lua_rawsetiFunction · 0.70

Tested by

no test coverage detected