MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / checkupval

Function checkupval

extlibs/lua/src/ldblib.c:284–290  ·  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

282** returns its index
283*/
284static int checkupval (lua_State *L, int argf, int argnup) {
285 int nup = (int)luaL_checkinteger(L, argnup); /* upvalue index */
286 luaL_checktype(L, argf, LUA_TFUNCTION); /* closure */
287 luaL_argcheck(L, (lua_getupvalue(L, argf, nup) != NULL), argnup,
288 "invalid upvalue index");
289 return nup;
290}
291
292
293static int db_upvalueid (lua_State *L) {

Callers 2

db_upvalueidFunction · 0.85
db_upvaluejoinFunction · 0.85

Calls 3

luaL_checkintegerFunction · 0.85
luaL_checktypeFunction · 0.85
lua_getupvalueFunction · 0.85

Tested by

no test coverage detected