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

Function checkupval

third-party/lua-5.3.5/src/ldblib.c:275–281  ·  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

273** returns its index
274*/
275static int checkupval (lua_State *L, int argf, int argnup) {
276 int nup = (int)luaL_checkinteger(L, argnup); /* upvalue index */
277 luaL_checktype(L, argf, LUA_TFUNCTION); /* closure */
278 luaL_argcheck(L, (lua_getupvalue(L, argf, nup) != NULL), argnup,
279 "invalid upvalue index");
280 return nup;
281}
282
283
284static 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_getupvalueFunction · 0.70

Tested by

no test coverage detected