aboutsummaryrefslogtreecommitdiff
path: root/ldo.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-04-03 10:35:34 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-04-03 10:35:34 -0300
commit0d88545b82b82671904474499b5d312141170ab6 (patch)
tree5a924d4d492dd987a5480a15cd1d12947089db85 /ldo.c
parentf84c5a5fc68f83b3adad37919e0096ea3c7f4129 (diff)
downloadlua-0d88545b82b82671904474499b5d312141170ab6.tar.gz
lua-0d88545b82b82671904474499b5d312141170ab6.tar.bz2
lua-0d88545b82b82671904474499b5d312141170ab6.zip
warnings from several compilers (mainly typecasts when lua_Number is float)
Diffstat (limited to 'ldo.c')
-rw-r--r--ldo.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/ldo.c b/ldo.c
index 985ab6e3..6dbfe833 100644
--- a/ldo.c
+++ b/ldo.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldo.c,v 1.215 2003/02/28 15:42:08 roberto Exp roberto $ 2** $Id: ldo.c,v 1.216 2003/02/28 19:45:15 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*/
@@ -196,7 +196,7 @@ static void adjust_varargs (lua_State *L, int nfixargs, StkId base) {
196 setobj2n(luaH_setnum(L, htab, i+1), L->top - actual + i); 196 setobj2n(luaH_setnum(L, htab, i+1), L->top - actual + i);
197 /* store counter in field `n' */ 197 /* store counter in field `n' */
198 setsvalue(&nname, luaS_newliteral(L, "n")); 198 setsvalue(&nname, luaS_newliteral(L, "n"));
199 setnvalue(luaH_set(L, htab, &nname), actual); 199 setnvalue(luaH_set(L, htab, &nname), cast(lua_Number, actual));
200 L->top -= actual; /* remove extra elements from the stack */ 200 L->top -= actual; /* remove extra elements from the stack */
201 sethvalue(L->top, htab); 201 sethvalue(L->top, htab);
202 incr_top(L); 202 incr_top(L);
@@ -251,10 +251,8 @@ StkId luaD_precall (lua_State *L, StkId func) {
251 L->base = L->ci->base = restorestack(L, funcr) + 1; 251 L->base = L->ci->base = restorestack(L, funcr) + 1;
252 ci->top = L->top + LUA_MINSTACK; 252 ci->top = L->top + LUA_MINSTACK;
253 ci->state = CI_C; /* a C function */ 253 ci->state = CI_C; /* a C function */
254 if (L->hookmask & LUA_MASKCALL) { 254 if (L->hookmask & LUA_MASKCALL)
255 luaD_callhook(L, LUA_HOOKCALL, -1); 255 luaD_callhook(L, LUA_HOOKCALL, -1);
256 ci = L->ci; /* previous call may reallocate `ci' */
257 }
258 lua_unlock(L); 256 lua_unlock(L);
259#ifdef LUA_COMPATUPVALUES 257#ifdef LUA_COMPATUPVALUES
260 lua_pushupvalues(L); 258 lua_pushupvalues(L);