| 1981 | |
| 1982 | |
| 1983 | static 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 | |
| 1999 | static int foldcap (CapState *cs) { |
no test coverage detected