diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/TaskMan.cc | 6 | ||||
-rw-r--r-- | lib/lua/src/lapi.c | 9 |
2 files changed, 10 insertions, 5 deletions
diff --git a/lib/TaskMan.cc b/lib/TaskMan.cc index 1752d8d..f42e8bd 100644 --- a/lib/TaskMan.cc +++ b/lib/TaskMan.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: TaskMan.cc,v 1.56 2008-07-02 10:05:16 pixel Exp $ */ +/* $Id: TaskMan.cc,v 1.57 2008-07-02 16:35:51 pixel Exp $ */ #ifndef _WIN32 #include <signal.h> @@ -237,7 +237,11 @@ static int poll (struct pollfd *fds, unsigned int nfds, int timeout) { return retval + n_non_socket; } +#ifdef _MSVC #define EPOCHFILETIME (116444736000000000i64) +#else +#define EPOCHFILETIME (116444736000000000LLU) +#endif // special version without timezone support... static int gettimeofday(struct timeval *tv, struct timezone *tz) diff --git a/lib/lua/src/lapi.c b/lib/lua/src/lapi.c index 32421e3..c2c898d 100644 --- a/lib/lua/src/lapi.c +++ b/lib/lua/src/lapi.c @@ -1,5 +1,5 @@ /* -** $Id: lapi.c,v 1.8 2008-02-18 10:15:45 pixel Exp $ +** $Id: lapi.c,v 1.9 2008-07-02 16:35:51 pixel Exp $ ** Lua API ** See Copyright Notice in lua.h */ @@ -93,14 +93,15 @@ void luaA_pushobject (lua_State *L, const TValue *o) { LUA_API int lua_checkstack (lua_State *L, int size) { - int res = 1; + int res; lua_lock(L); - if (size > LUAI_MAXCSTACK || (L->top - L->base + size) > LUAI_MAXCSTACK) + if ((L->top - L->base + size) > LUAI_MAXCSTACK) res = 0; /* stack overflow */ - else if (size > 0) { + else { luaD_checkstack(L, size); if (L->ci->top < L->top + size) L->ci->top = L->top + size; + res = 1; } lua_unlock(L); return res; |