Add basic lua 5.3 support

This commit is contained in:
Bart van Strien
2015-06-16 10:25:41 +02:00
parent df1bd42dec
commit 3cb777e2b7
39 changed files with 252 additions and 187 deletions
+4 -4
View File
@@ -80,10 +80,10 @@ int w_Image_refresh(lua_State *L)
{
Image *i = luax_checkimage(L, 1);
int xoffset = luaL_optint(L, 2, 0);
int yoffset = luaL_optint(L, 3, 0);
int w = luaL_optint(L, 4, i->getWidth());
int h = luaL_optint(L, 5, i->getHeight());
int xoffset = (int) luaL_optnumber(L, 2, 0);
int yoffset = (int) luaL_optnumber(L, 3, 0);
int w = (int) luaL_optnumber(L, 4, i->getWidth());
int h = (int) luaL_optnumber(L, 5, i->getHeight());
luax_catchexcept(L, [&](){ i->refresh(xoffset, yoffset, w, h); });
return 0;