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

Function set_l

other_src/lua/src/lpeg.cpp:1116–1129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1114
1115
1116static int set_l (lua_State *L) {
1117 size_t l;
1118 const char *s = luaL_checklstring(L, 1, &l);
1119 if (l == 1)
1120 getpatt(L, 1, NULL); /* a unit set is equivalent to a literal */
1121 else {
1122 Instruction *p = newcharset(L);
1123 while (l--) {
1124 setchar(p[1].buff, (byte)(*s));
1125 s++;
1126 }
1127 }
1128 return 1;
1129}
1130
1131
1132static int range_l (lua_State *L) {

Callers

nothing calls this directly

Calls 3

getpattFunction · 0.85
newcharsetFunction · 0.85
luaL_checklstringFunction · 0.70

Tested by

no test coverage detected