MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / checkupval

Function checkupval

lib/lua/src/ldblib.c:285–295  ·  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

283** returns its index
284*/
285static void *checkupval (lua_State *L, int argf, int argnup, int *pnup) {
286 void *id;
287 int nup = (int)luaL_checkinteger(L, argnup); /* upvalue index */
288 luaL_checktype(L, argf, LUA_TFUNCTION); /* closure */
289 id = lua_upvalueid(L, argf, nup);
290 if (pnup) {
291 luaL_argcheck(L, id != NULL, argnup, "invalid upvalue index");
292 *pnup = nup;
293 }
294 return id;
295}
296
297
298static 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_upvalueidFunction · 0.85

Tested by

no test coverage detected