aboutsummaryrefslogtreecommitdiff
path: root/lpvm.c
diff options
context:
space:
mode:
authorSergio Queiroz <sqmedeiros@gmail.com>2016-06-27 15:24:09 -0300
committerSergio Queiroz <sqmedeiros@gmail.com>2016-06-27 15:24:09 -0300
commitd9fa8ccdf9af5c01a31cfe81eaf3d90e84b41428 (patch)
tree662f1cfe618eae04d8180b817a67b4b21dff239e /lpvm.c
parent450cb2596448c19e672a30616bbd22d98b8c6588 (diff)
downloadlpeglabel-d9fa8ccdf9af5c01a31cfe81eaf3d90e84b41428.tar.gz
lpeglabel-d9fa8ccdf9af5c01a31cfe81eaf3d90e84b41428.tar.bz2
lpeglabel-d9fa8ccdf9af5c01a31cfe81eaf3d90e84b41428.zip
Updating lpeglabel to lpeg-1.0
Diffstat (limited to 'lpvm.c')
-rw-r--r--lpvm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lpvm.c b/lpvm.c
index 3ae22f5..c15d543 100644
--- a/lpvm.c
+++ b/lpvm.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lpvm.c,v 1.5 2013/04/12 16:29:49 roberto Exp $ 2** $Id: lpvm.c,v 1.6 2015/09/28 17:01:25 roberto Exp $
3** Copyright 2007, Lua.org & PUC-Rio (see 'lpeg.html' for license) 3** Copyright 2007, Lua.org & PUC-Rio (see 'lpeg.html' for license)
4*/ 4*/
5 5
@@ -18,7 +18,7 @@
18 18
19/* initial size for call/backtrack stack */ 19/* initial size for call/backtrack stack */
20#if !defined(INITBACK) 20#if !defined(INITBACK)
21#define INITBACK 100 21#define INITBACK MAXBACK
22#endif 22#endif
23 23
24 24
@@ -71,7 +71,7 @@ static Stack *doublestack (lua_State *L, Stack **stacklimit, int ptop) {
71 max = lua_tointeger(L, -1); /* maximum allowed size */ 71 max = lua_tointeger(L, -1); /* maximum allowed size */
72 lua_pop(L, 1); 72 lua_pop(L, 1);
73 if (n >= max) /* already at maximum size? */ 73 if (n >= max) /* already at maximum size? */
74 luaL_error(L, "too many pending calls/choices"); 74 luaL_error(L, "backtrack stack overflow (current limit is %d)", max);
75 newn = 2 * n; /* new size */ 75 newn = 2 * n; /* new size */
76 if (newn > max) newn = max; 76 if (newn > max) newn = max;
77 newstack = (Stack *)lua_newuserdata(L, newn * sizeof(Stack)); 77 newstack = (Stack *)lua_newuserdata(L, newn * sizeof(Stack));