diff options
author | scuri <scuri> | 2010-10-25 18:29:06 +0000 |
---|---|---|
committer | scuri <scuri> | 2010-10-25 18:29:06 +0000 |
commit | b007c2695ead1e484cf327765c47d8346f632447 (patch) | |
tree | 383fa5243f5fc20349f3e7f79b6fcf079e8378e9 /src/lua5/imlua_palette.c | |
parent | aff7346948dc33cf2ebb22ed7ef1b93796c85ce7 (diff) |
*** empty log message ***
Diffstat (limited to 'src/lua5/imlua_palette.c')
-rw-r--r-- | src/lua5/imlua_palette.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lua5/imlua_palette.c b/src/lua5/imlua_palette.c index 135fe9a..029374c 100644 --- a/src/lua5/imlua_palette.c +++ b/src/lua5/imlua_palette.c @@ -2,7 +2,7 @@ * \brief IM Lua 5 Binding * * See Copyright Notice in im_lib.h - * $Id: imlua_palette.c,v 1.2 2010/06/11 17:43:52 scuri Exp $ + * $Id: imlua_palette.c,v 1.3 2010/10/25 18:29:07 scuri Exp $ */ #include <string.h> @@ -91,7 +91,7 @@ static int imluaPaletteCreate(lua_State *L) static int imluaPaletteFindNearest (lua_State *L) { imluaPalette *pal = imlua_checkpalette(L, 1); - long color = (long int) lua_touserdata(L, 1); + long color = (long)lua_touserdata(L, 1); lua_pushnumber(L, imPaletteFindNearest(pal->color, pal->count, color)); return 1; @@ -103,7 +103,7 @@ static int imluaPaletteFindNearest (lua_State *L) static int imluaPaletteFindColor (lua_State *L) { imluaPalette *pal = imlua_checkpalette(L, 1); - long color = (long) lua_touserdata(L, 2); + long color = (long)lua_touserdata(L, 2); unsigned char tol = (unsigned char)luaL_checkint(L, 3); lua_pushnumber(L, imPaletteFindColor(pal->color, pal->count, color, tol)); @@ -241,7 +241,7 @@ static int imluaPaletteUniform (lua_State *L) \*****************************************************************************/ static int imluaPaletteUniformIndex (lua_State *L) { - lua_pushnumber(L, imPaletteUniformIndex((long int) lua_touserdata(L, 1))); + lua_pushnumber(L, imPaletteUniformIndex((long)lua_touserdata(L, 1))); return 1; } @@ -250,7 +250,7 @@ static int imluaPaletteUniformIndex (lua_State *L) \*****************************************************************************/ static int imluaPaletteUniformIndexHalftoned (lua_State *L) { - long color = (long) lua_touserdata(L, 1); + long color = (long)lua_touserdata(L, 1); int x = luaL_checkint(L, 2); int y = luaL_checkint(L, 3); @@ -321,7 +321,7 @@ static int imluaPalette_newindex(lua_State *L) if (!lua_islightuserdata(L, 3)) luaL_argerror(L, 3, "color must be a light user data"); - color_i = (long int) lua_touserdata(L, 3); + color_i = (long)lua_touserdata(L, 3); pal->color[index_i] = color_i; return 0; |