MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / querycap

Function querycap

other_src/lua/src/lpeg.cpp:1983–1996  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1981
1982
1983static int querycap (CapState *cs) {
1984 int idx = cs->cap->idx;
1985 int n = pushallvalues(cs, 0);
1986 if (n > 1) /* extra captures? */
1987 lua_pop(cs->L, n - 1); /* throw them away */
1988 updatecache(cs, idx);
1989 lua_gettable(cs->L, subscache(cs));
1990 if (!lua_isnil(cs->L, -1))
1991 return 1;
1992 else {
1993 lua_pop(cs->L, 1); /* remove value */
1994 return 0;
1995 }
1996}
1997
1998
1999static int foldcap (CapState *cs) {

Callers 1

pushcaptureFunction · 0.85

Calls 2

pushallvaluesFunction · 0.85
lua_gettableFunction · 0.70

Tested by

no test coverage detected