diff options
author | Sérgio Queiroz <sqmedeiros@gmail.com> | 2017-12-26 09:46:38 -0300 |
---|---|---|
committer | Sérgio Queiroz <sqmedeiros@gmail.com> | 2017-12-26 09:46:38 -0300 |
commit | f6c68a6313e1700c25a523adde5f92ca1f7f67b6 (patch) | |
tree | 1b43605a84caaabb52934620b63b69a8d3a1e7ef | |
parent | 4cd22aa26a5256009d258e81aa10419199decb39 (diff) | |
download | lpeglabel-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.c | 2 | ||||
-rw-r--r-- | lpvm.c | 2 | ||||
-rw-r--r-- | lpvm.h | 2 |
3 files changed, 3 insertions, 3 deletions
@@ -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 */ |
@@ -147,7 +147,7 @@ static int removedyncap (lua_State *L, Capture *capture, | |||
147 | ** Opcode interpreter | 147 | ** Opcode interpreter |
148 | */ | 148 | */ |
149 | const char *match (lua_State *L, const char *o, const char *s, const char *e, | 149 | const 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 */ |
@@ -53,7 +53,7 @@ typedef union Instruction { | |||
53 | 53 | ||
54 | void printpatt (Instruction *p, int n); | 54 | void printpatt (Instruction *p, int n); |
55 | const char *match (lua_State *L, const char *o, const char *s, const char *e, | 55 | const 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 |