mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-16 01:01:50 +00:00
MODLANG-87 - Update to lua 5.1.4 release
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10100 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: lapi.c,v 2.55.1.3 2008/01/03 15:20:39 roberto Exp $
|
||||
** $Id: lapi.c,v 2.55.1.5 2008/07/04 18:41:18 roberto Exp $
|
||||
** Lua API
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@@ -93,15 +93,14 @@ void luaA_pushobject (lua_State *L, const TValue *o) {
|
||||
|
||||
|
||||
LUA_API int lua_checkstack (lua_State *L, int size) {
|
||||
int res;
|
||||
int res = 1;
|
||||
lua_lock(L);
|
||||
if ((L->top - L->base + size) > LUAI_MAXCSTACK)
|
||||
if (size > LUAI_MAXCSTACK || (L->top - L->base + size) > LUAI_MAXCSTACK)
|
||||
res = 0; /* stack overflow */
|
||||
else {
|
||||
else if (size > 0) {
|
||||
luaD_checkstack(L, size);
|
||||
if (L->ci->top < L->top + size)
|
||||
L->ci->top = L->top + size;
|
||||
res = 1;
|
||||
}
|
||||
lua_unlock(L);
|
||||
return res;
|
||||
@@ -930,10 +929,13 @@ LUA_API int lua_gc (lua_State *L, int what, int data) {
|
||||
g->GCthreshold = g->totalbytes - a;
|
||||
else
|
||||
g->GCthreshold = 0;
|
||||
while (g->GCthreshold <= g->totalbytes)
|
||||
while (g->GCthreshold <= g->totalbytes) {
|
||||
luaC_step(L);
|
||||
if (g->gcstate == GCSpause) /* end of cycle? */
|
||||
res = 1; /* signal it */
|
||||
if (g->gcstate == GCSpause) { /* end of cycle? */
|
||||
res = 1; /* signal it */
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case LUA_GCSETPAUSE: {
|
||||
|
||||
Reference in New Issue
Block a user