diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-05-31 11:25:18 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-05-31 11:25:18 -0300 |
commit | 90de38bf1f85714526c30e42b670ca997ec45827 (patch) | |
tree | c9dbf61d741ddd2ededcba4c1a4da99211c28f7a /ldo.c | |
parent | e8a7ecb982effdfc1148098b288c6ac7130f756e (diff) | |
download | lua-90de38bf1f85714526c30e42b670ca997ec45827.tar.gz lua-90de38bf1f85714526c30e42b670ca997ec45827.tar.bz2 lua-90de38bf1f85714526c30e42b670ca997ec45827.zip |
warnings in VS .Net
Diffstat (limited to 'ldo.c')
-rw-r--r-- | ldo.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.c,v 2.23 2005/05/03 19:01:17 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 2.24 2005/05/20 19:09:05 roberto Exp roberto $ |
3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -97,7 +97,7 @@ int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud) { | |||
97 | static void restore_stack_limit (lua_State *L) { | 97 | static void restore_stack_limit (lua_State *L) { |
98 | lua_assert(L->stack_last - L->stack == L->stacksize - EXTRA_STACK - 1); | 98 | lua_assert(L->stack_last - L->stack == L->stacksize - EXTRA_STACK - 1); |
99 | if (L->size_ci > LUAI_MAXCALLS) { /* there was an overflow? */ | 99 | if (L->size_ci > LUAI_MAXCALLS) { /* there was an overflow? */ |
100 | int inuse = (L->ci - L->base_ci); | 100 | int inuse = cast(int, L->ci - L->base_ci); |
101 | if (inuse + 1 < LUAI_MAXCALLS) /* can `undo' overflow? */ | 101 | if (inuse + 1 < LUAI_MAXCALLS) /* can `undo' overflow? */ |
102 | luaD_reallocCI(L, LUAI_MAXCALLS); | 102 | luaD_reallocCI(L, LUAI_MAXCALLS); |
103 | } | 103 | } |
@@ -173,7 +173,7 @@ void luaD_callhook (lua_State *L, int event, int line) { | |||
173 | if (event == LUA_HOOKTAILRET) | 173 | if (event == LUA_HOOKTAILRET) |
174 | ar.i_ci = 0; /* tail call; no debug information about it */ | 174 | ar.i_ci = 0; /* tail call; no debug information about it */ |
175 | else | 175 | else |
176 | ar.i_ci = L->ci - L->base_ci; | 176 | ar.i_ci = cast(int, L->ci - L->base_ci); |
177 | luaD_checkstack(L, LUA_MINSTACK); /* ensure minimum stack size */ | 177 | luaD_checkstack(L, LUA_MINSTACK); /* ensure minimum stack size */ |
178 | L->ci->top = L->top + LUA_MINSTACK; | 178 | L->ci->top = L->top + LUA_MINSTACK; |
179 | lua_assert(L->ci->top <= L->stack_last); | 179 | lua_assert(L->ci->top <= L->stack_last); |
@@ -260,7 +260,7 @@ int luaD_precall (lua_State *L, StkId func, int nresults) { | |||
260 | StkId st, base; | 260 | StkId st, base; |
261 | Proto *p = cl->p; | 261 | Proto *p = cl->p; |
262 | if (p->is_vararg) { /* varargs? */ | 262 | if (p->is_vararg) { /* varargs? */ |
263 | int nargs = L->top - restorestack(L, funcr) - 1; | 263 | int nargs = cast(int, L->top - restorestack(L, funcr)) - 1; |
264 | luaD_checkstack(L, p->maxstacksize + nargs); | 264 | luaD_checkstack(L, p->maxstacksize + nargs); |
265 | base = adjust_varargs(L, p->numparams, nargs, p->is_vararg); | 265 | base = adjust_varargs(L, p->numparams, nargs, p->is_vararg); |
266 | func = restorestack(L, funcr); | 266 | func = restorestack(L, funcr); |
@@ -380,7 +380,7 @@ static void resume (lua_State *L, void *ud) { | |||
380 | } /* else yielded inside a hook: just continue its execution */ | 380 | } /* else yielded inside a hook: just continue its execution */ |
381 | } | 381 | } |
382 | L->status = 0; | 382 | L->status = 0; |
383 | firstResult = luaV_execute(L, L->ci - L->base_ci); | 383 | firstResult = luaV_execute(L, cast(int, L->ci - L->base_ci)); |
384 | if (firstResult != NULL) { /* return? */ | 384 | if (firstResult != NULL) { /* return? */ |
385 | luaD_poscall(L, LUA_MULTRET, firstResult); /* finalize this coroutine */ | 385 | luaD_poscall(L, LUA_MULTRET, firstResult); /* finalize this coroutine */ |
386 | } | 386 | } |