aboutsummaryrefslogtreecommitdiff
path: root/lauxlib.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 /lauxlib.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 'lauxlib.c')
-rw-r--r--lauxlib.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lauxlib.c b/lauxlib.c
index 9cfeeb71..6f802534 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lauxlib.c,v 1.97 2003/03/18 18:48:31 roberto Exp roberto $ 2** $Id: lauxlib.c,v 1.98 2003/04/01 17:52:31 roberto Exp roberto $
3** Auxiliary functions for building Lua libraries 3** Auxiliary functions for building Lua libraries
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -278,13 +278,13 @@ void luaL_setn (lua_State *L, int t, int n) {
278 lua_rawget(L, t); 278 lua_rawget(L, t);
279 if (checkint(L, 1) >= 0) { /* is there a numeric field `n'? */ 279 if (checkint(L, 1) >= 0) { /* is there a numeric field `n'? */
280 lua_pushliteral(L, "n"); /* use it */ 280 lua_pushliteral(L, "n"); /* use it */
281 lua_pushnumber(L, n); 281 lua_pushnumber(L, (lua_Number)n);
282 lua_rawset(L, t); 282 lua_rawset(L, t);
283 } 283 }
284 else { /* use `sizes' */ 284 else { /* use `sizes' */
285 getsizes(L); 285 getsizes(L);
286 lua_pushvalue(L, t); 286 lua_pushvalue(L, t);
287 lua_pushnumber(L, n); 287 lua_pushnumber(L, (lua_Number)n);
288 lua_rawset(L, -3); /* sizes[t] = n */ 288 lua_rawset(L, -3); /* sizes[t] = n */
289 lua_pop(L, 1); /* remove `sizes' */ 289 lua_pop(L, 1); /* remove `sizes' */
290 } 290 }
@@ -438,7 +438,7 @@ LUALIB_API void luaL_unref (lua_State *L, int t, int ref) {
438 if (ref >= 0) { 438 if (ref >= 0) {
439 lua_rawgeti(L, t, FREELIST_REF); 439 lua_rawgeti(L, t, FREELIST_REF);
440 lua_rawseti(L, t, ref); /* t[ref] = t[FREELIST_REF] */ 440 lua_rawseti(L, t, ref); /* t[ref] = t[FREELIST_REF] */
441 lua_pushnumber(L, ref); 441 lua_pushnumber(L, (lua_Number)ref);
442 lua_rawseti(L, t, FREELIST_REF); /* t[FREELIST_REF] = ref */ 442 lua_rawseti(L, t, FREELIST_REF); /* t[FREELIST_REF] = ref */
443 } 443 }
444} 444}