From 798660c9cddef8a73f68058576e3d47eed2b1a27 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 1 Oct 2014 08:54:56 -0300 Subject: deprecated "cast macros" ('luaL_checkint', 'luaL_optint', etc.) --- lstrlib.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lstrlib.c') diff --git a/lstrlib.c b/lstrlib.c index b73b306e..eb40995f 100644 --- a/lstrlib.c +++ b/lstrlib.c @@ -1,5 +1,5 @@ /* -** $Id: lstrlib.c,v 1.200 2014/07/30 13:59:24 roberto Exp roberto $ +** $Id: lstrlib.c,v 1.201 2014/08/20 22:06:41 roberto Exp roberto $ ** Standard library for string operations and pattern-matching ** See Copyright Notice in lua.h */ @@ -890,7 +890,7 @@ static int str_format (lua_State *L) { strfrmt = scanformat(L, strfrmt, form); switch (*strfrmt++) { case 'c': { - nb = sprintf(buff, form, luaL_checkint(L, arg)); + nb = sprintf(buff, form, (int)luaL_checkinteger(L, arg)); break; } case 'd': case 'i': @@ -984,11 +984,11 @@ static int getendian (lua_State *L, int arg) { static int getintsize (lua_State *L, int arg) { - int size = luaL_optint(L, arg, 0); + lua_Integer size = luaL_optinteger(L, arg, 0); if (size == 0) size = SZINT; luaL_argcheck(L, 1 <= size && size <= MAXINTSIZE, arg, "integer size out of valid range"); - return size; + return (int)size; } -- cgit v1.2.3-55-g6feb