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

Function checkupval

third-party/lua-5.5.0/src/ldblib.c:288–298  ·  view source on GitHub ↗

** Check whether a given upvalue from a given closure exists and ** returns its index */

Source from the content-addressed store, hash-verified

286** returns its index
287*/
288static void *checkupval (lua_State *L, int argf, int argnup, int *pnup) {
289 void *id;
290 int nup = (int)luaL_checkinteger(L, argnup); /* upvalue index */
291 luaL_checktype(L, argf, LUA_TFUNCTION); /* closure */
292 id = lua_upvalueid(L, argf, nup);
293 if (pnup) {
294 luaL_argcheck(L, id != NULL, argnup, "invalid upvalue index");
295 *pnup = nup;
296 }
297 return id;
298}
299
300
301static int db_upvalueid (lua_State *L) {

Callers 2

db_upvalueidFunction · 0.70
db_upvaluejoinFunction · 0.70

Calls 3

luaL_checkintegerFunction · 0.70
luaL_checktypeFunction · 0.70
lua_upvalueidFunction · 0.70

Tested by

no test coverage detected