Fix many warnings about implicit integer conversions when compiling for 64 bits.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2015-02-20 01:20:08 -04:00
parent 85de3c41fb
commit ebc68023a7
39 changed files with 114 additions and 114 deletions
+6 -3
View File
@@ -330,19 +330,22 @@ int luax_table_insert(lua_State *L, int tindex, int vindex, int pos)
tindex = lua_gettop(L)+1+tindex;
if (vindex < 0)
vindex = lua_gettop(L)+1+vindex;
if (pos == -1)
{
lua_pushvalue(L, vindex);
lua_rawseti(L, tindex, lua_objlen(L, tindex)+1);
lua_rawseti(L, tindex, (int) lua_objlen(L, tindex)+1);
return 0;
}
else if (pos < 0)
pos = lua_objlen(L, tindex)+1+pos;
for (int i = lua_objlen(L, tindex)+1; i > pos; i--)
pos = (int) lua_objlen(L, tindex)+1+pos;
for (int i = (int) lua_objlen(L, tindex)+1; i > pos; i--)
{
lua_rawgeti(L, tindex, i-1);
lua_rawseti(L, tindex, i);
}
lua_pushvalue(L, vindex);
lua_rawseti(L, tindex, pos);
return 0;