aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSérgio Queiroz <sqmedeiros@gmail.com>2017-12-26 09:46:38 -0300
committerSérgio Queiroz <sqmedeiros@gmail.com>2017-12-26 09:46:38 -0300
commitf6c68a6313e1700c25a523adde5f92ca1f7f67b6 (patch)
tree1b43605a84caaabb52934620b63b69a8d3a1e7ef
parent4cd22aa26a5256009d258e81aa10419199decb39 (diff)
downloadlpeglabel-f6c68a6313e1700c25a523adde5f92ca1f7f67b6.tar.gz
lpeglabel-f6c68a6313e1700c25a523adde5f92ca1f7f67b6.tar.bz2
lpeglabel-f6c68a6313e1700c25a523adde5f92ca1f7f67b6.zip
The var that keeps the number of a label should be short instead of byte
-rw-r--r--lptree.c2
-rw-r--r--lpvm.c2
-rw-r--r--lpvm.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/lptree.c b/lptree.c
index 59e920d..bc0333b 100644
--- a/lptree.c
+++ b/lptree.c
@@ -1196,7 +1196,7 @@ static int lp_match (lua_State *L) {
1196 const char *s = luaL_checklstring(L, SUBJIDX, &l); 1196 const char *s = luaL_checklstring(L, SUBJIDX, &l);
1197 size_t i = initposition(L, l); 1197 size_t i = initposition(L, l);
1198 int ptop = lua_gettop(L); 1198 int ptop = lua_gettop(L);
1199 byte labelf; /* labeled failure */ 1199 short labelf; /* labeled failure */
1200 const char *sfail = NULL; /* labeled failure */ 1200 const char *sfail = NULL; /* labeled failure */
1201 lua_pushnil(L); /* initialize subscache */ 1201 lua_pushnil(L); /* initialize subscache */
1202 lua_pushlightuserdata(L, capture); /* initialize caplistidx */ 1202 lua_pushlightuserdata(L, capture); /* initialize caplistidx */
diff --git a/lpvm.c b/lpvm.c
index 20bc545..5234e99 100644
--- a/lpvm.c
+++ b/lpvm.c
@@ -147,7 +147,7 @@ static int removedyncap (lua_State *L, Capture *capture,
147** Opcode interpreter 147** Opcode interpreter
148*/ 148*/
149const char *match (lua_State *L, const char *o, const char *s, const char *e, 149const char *match (lua_State *L, const char *o, const char *s, const char *e,
150 Instruction *op, Capture *capture, int ptop, byte *labelf, const char **sfail) { /* labeled failure */ 150 Instruction *op, Capture *capture, int ptop, short *labelf, const char **sfail) { /* labeled failure */
151 Stack stackbase[INITBACK]; 151 Stack stackbase[INITBACK];
152 Stack *stacklimit = stackbase + INITBACK; 152 Stack *stacklimit = stackbase + INITBACK;
153 Stack *stack = stackbase; /* point to first empty slot in stack */ 153 Stack *stack = stackbase; /* point to first empty slot in stack */
diff --git a/lpvm.h b/lpvm.h
index a56da32..81a6678 100644
--- a/lpvm.h
+++ b/lpvm.h
@@ -53,7 +53,7 @@ typedef union Instruction {
53 53
54void printpatt (Instruction *p, int n); 54void printpatt (Instruction *p, int n);
55const char *match (lua_State *L, const char *o, const char *s, const char *e, 55const char *match (lua_State *L, const char *o, const char *s, const char *e,
56 Instruction *op, Capture *capture, int ptop, byte *labelf, const char **sfail); /* labeled failure */ 56 Instruction *op, Capture *capture, int ptop, short *labelf, const char **sfail); /* labeled failure */
57 57
58 58
59#endif 59#endif