diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2010-09-09 02:26:30 +0200 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2010-09-09 02:32:26 +0200 |
commit | 7505e88db66798b2b8fcdff2d92a7136cd826b5b (patch) | |
tree | b6ced565318f8e8112e35cb0ad53abe4212ef8de /iup/srclua5/il_matrix_aux.c | |
parent | e9a184546b18cf3b796bd560561f312934004c54 (diff) |
Upgrading to IUP 3.2 - and cleaning up.
Diffstat (limited to 'iup/srclua5/il_matrix_aux.c')
-rwxr-xr-x | iup/srclua5/il_matrix_aux.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/iup/srclua5/il_matrix_aux.c b/iup/srclua5/il_matrix_aux.c index 240c837..f9f83a7 100755 --- a/iup/srclua5/il_matrix_aux.c +++ b/iup/srclua5/il_matrix_aux.c @@ -38,7 +38,7 @@ static int matrix_bgcolor_cb(Ihandle *self, int p0, int p1, unsigned int *p2, un ret = iuplua_call_raw(L, 2+2, LUA_MULTRET); /* 2 args + 2 args(errormsg, handle), variable number of returns */ if (ret || lua_isnil(L, -1)) return IUP_DEFAULT; - ret = (int)lua_tonumber(L,-1); + ret = lua_tointeger(L,-1); if (ret == IUP_IGNORE) { @@ -46,9 +46,9 @@ static int matrix_bgcolor_cb(Ihandle *self, int p0, int p1, unsigned int *p2, un return IUP_IGNORE; } - *p2 = (unsigned int)lua_tonumber(L, -4); - *p3 = (unsigned int)lua_tonumber(L, -3); - *p4 = (unsigned int)lua_tonumber(L, -2); + *p2 = (unsigned int)lua_tointeger(L, -4); + *p3 = (unsigned int)lua_tointeger(L, -3); + *p4 = (unsigned int)lua_tointeger(L, -2); lua_pop(L, 1); return IUP_DEFAULT; } @@ -62,7 +62,7 @@ static int matrix_fgcolor_cb(Ihandle *self, int p0, int p1, unsigned int *p2, un ret = iuplua_call_raw(L, 2+2, LUA_MULTRET); /* 2 args + 2 args(errormsg, handle), variable number of returns */ if (ret || lua_isnil(L, -1)) return IUP_DEFAULT; - ret = (int)lua_tonumber(L,-1); + ret = lua_tointeger(L,-1); if (ret == IUP_IGNORE) { @@ -70,9 +70,9 @@ static int matrix_fgcolor_cb(Ihandle *self, int p0, int p1, unsigned int *p2, un return IUP_IGNORE; } - *p2 = (unsigned int)lua_tonumber(L, -4); - *p3 = (unsigned int)lua_tonumber(L, -3); - *p4 = (unsigned int)lua_tonumber(L, -2); + *p2 = (unsigned int)lua_tointeger(L, -4); + *p3 = (unsigned int)lua_tointeger(L, -3); + *p4 = (unsigned int)lua_tointeger(L, -2); lua_pop(L, 1); return IUP_DEFAULT; } |