summaryrefslogtreecommitdiff
path: root/iup/srclua5/il_getcolor.c
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2010-09-09 02:26:30 +0200
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2010-09-09 02:32:26 +0200
commit7505e88db66798b2b8fcdff2d92a7136cd826b5b (patch)
treeb6ced565318f8e8112e35cb0ad53abe4212ef8de /iup/srclua5/il_getcolor.c
parente9a184546b18cf3b796bd560561f312934004c54 (diff)
Upgrading to IUP 3.2 - and cleaning up.
Diffstat (limited to 'iup/srclua5/il_getcolor.c')
-rwxr-xr-xiup/srclua5/il_getcolor.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/iup/srclua5/il_getcolor.c b/iup/srclua5/il_getcolor.c
index 4d6cf71..e62e977 100755
--- a/iup/srclua5/il_getcolor.c
+++ b/iup/srclua5/il_getcolor.c
@@ -18,17 +18,17 @@
static int GetColor(lua_State *L)
{
- int x = (int)luaL_checknumber(L,1);
- int y = (int)luaL_checknumber(L,2);
+ int x = luaL_checkinteger(L,1);
+ int y = luaL_checkinteger(L,2);
unsigned char r = (unsigned char) luaL_optnumber(L,3,0);
unsigned char g = (unsigned char) luaL_optnumber(L,4,0);
unsigned char b = (unsigned char) luaL_optnumber(L,5,0);
int ret = IupGetColor(x,y,&r,&g,&b);
if (ret)
{
- lua_pushnumber(L, (int) r);
- lua_pushnumber(L, (int) g);
- lua_pushnumber(L, (int) b);
+ lua_pushinteger(L, r);
+ lua_pushinteger(L, g);
+ lua_pushinteger(L, b);
return 3;
}
else