From 9f7183c280f310c0d0b49b7b9c3b8eac297fafa7 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 21 Apr 2023 15:29:53 -0300 Subject: Field Instruction.key put inside a union So that we can get its space for other uses, if needed. --- lpvm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lpvm.c') diff --git a/lpvm.c b/lpvm.c index 8c001fc..9ee00a7 100644 --- a/lpvm.c +++ b/lpvm.c @@ -20,7 +20,7 @@ #define getoffset(p) (((p) + 1)->offset) -static const Instruction giveup = {{IGiveup, 0, 0}}; +static const Instruction giveup = {{IGiveup, 0, {0}}}; /* @@ -249,12 +249,12 @@ const char *match (lua_State *L, const char *o, const char *s, const char *e, continue; } case IChar: { - if ((byte)*s == p->i.aux && s < e) { p++; s++; } + if ((byte)*s == p->i.aux1 && s < e) { p++; s++; } else goto fail; continue; } case ITestChar: { - if ((byte)*s == p->i.aux && s < e) p += 2; + if ((byte)*s == p->i.aux1 && s < e) p += 2; else p += getoffset(p); continue; } @@ -273,7 +273,7 @@ const char *match (lua_State *L, const char *o, const char *s, const char *e, continue; } case IBehind: { - int n = p->i.aux; + int n = p->i.aux1; if (n > s - o) goto fail; s -= n; p++; continue; @@ -404,7 +404,7 @@ const char *match (lua_State *L, const char *o, const char *s, const char *e, capture[captop].s = s - getoff(p); /* goto pushcapture; */ pushcapture: { - capture[captop].idx = p->i.key; + capture[captop].idx = p->i.aux2.key; capture[captop].kind = getkind(p); captop++; capture = growcap(L, capture, &capsize, captop, 0, ptop); -- cgit v1.2.3-55-g6feb