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

Function testpattern

other_src/lua/src/lpeg.cpp:1158–1169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1156
1157
1158static int testpattern (lua_State *L, int idx) {
1159 if (lua_touserdata(L, idx)) { /* value is a userdata? */
1160 if (lua_getmetatable(L, idx)) { /* does it have a metatable? */
1161 luaL_getmetatable(L, PATTERN_T);
1162 if (lua_rawequal(L, -1, -2)) { /* does it have the correct mt? */
1163 lua_pop(L, 2); /* remove both metatables */
1164 return 1;
1165 }
1166 }
1167 }
1168 return 0;
1169}
1170
1171
1172static Instruction *fix_l (lua_State *L, int t) {

Callers 2

fix_lFunction · 0.85
type_lFunction · 0.85

Calls 3

lua_touserdataFunction · 0.70
lua_getmetatableFunction · 0.70
lua_rawequalFunction · 0.70

Tested by

no test coverage detected