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

Function doublecap

other_src/lua/src/lpeg.cpp:391–399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

389
390
391static Capture *doublecap (lua_State *L, Capture *cap, int captop, int ptop) {
392 Capture *newc;
393 if (captop >= INT_MAX/((int)sizeof(Capture) * 2))
394 luaL_error(L, "too many captures");
395 newc = (Capture *)lua_newuserdata(L, captop * 2 * sizeof(Capture));
396 memcpy(newc, cap, captop * sizeof(Capture));
397 lua_replace(L, caplistidx(ptop));
398 return newc;
399}
400
401
402static Stack *doublestack (lua_State *L, Stack **stacklimit, int ptop) {

Callers 1

matchFunction · 0.85

Calls 3

luaL_errorFunction · 0.70
lua_newuserdataFunction · 0.70
lua_replaceFunction · 0.70

Tested by

no test coverage detected