From 79895cebcd005bdb31a6818351f47cff19dfca42 Mon Sep 17 00:00:00 2001 From: Bruno Silvestre Date: Wed, 11 Feb 2015 09:15:27 -0200 Subject: [PATCH] luaL_checkint() --> luaL-checkinteger() --- gem/gem.c | 2 +- gem/ltn012.tex | 2 +- ltn012.wiki | 2 +- src/luasocket.c | 2 +- src/mime.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gem/gem.c b/gem/gem.c index 976f74d..728dedd 100644 --- a/gem/gem.c +++ b/gem/gem.c @@ -24,7 +24,7 @@ static int pushchar(int c, int last, const char *marker, } static int eol(lua_State *L) { - int context = luaL_checkint(L, 1); + int context = (int)luaL_checkinteger(L, 1); size_t isize = 0; const char *input = luaL_optlstring(L, 2, NULL, &isize); const char *last = input + isize; diff --git a/gem/ltn012.tex b/gem/ltn012.tex index 8027ecc..a745d50 100644 --- a/gem/ltn012.tex +++ b/gem/ltn012.tex @@ -269,7 +269,7 @@ times: \begin{C} @stick# static int eol(lua_State *L) { - int context = luaL_checkint(L, 1); + int context = (int)luaL_checkinteger(L, 1); size_t isize = 0; const char *input = luaL_optlstring(L, 2, NULL, &isize); const char *last = input + isize; diff --git a/ltn012.wiki b/ltn012.wiki index 96b13ae..520ae21 100644 --- a/ltn012.wiki +++ b/ltn012.wiki @@ -89,7 +89,7 @@ static int process(int c, int last, const char *marker, luaL_Buffer *buffer) { The inner function makes use of Lua's auxiliary library's buffer interface for its efficiency and ease of use. The outer function simply interfaces with Lua. It receives the context and the input chunk (as well as an optional end-of-line marker), and returns the transformed output and the new context. {{{ static int eol(lua_State *L) { - int ctx = luaL_checkint(L, 1); + int ctx = (int)luaL_checkinteger(L, 1); size_t isize = 0; const char *input = luaL_optlstring(L, 2, NULL, &isize); const char *last = input + isize; diff --git a/src/luasocket.c b/src/luasocket.c index e6ee747..cd2990d 100644 --- a/src/luasocket.c +++ b/src/luasocket.c @@ -64,7 +64,7 @@ static luaL_Reg func[] = { * Skip a few arguments \*-------------------------------------------------------------------------*/ static int global_skip(lua_State *L) { - int amount = luaL_checkint(L, 1); + int amount = (int)luaL_checkinteger(L, 1); int ret = lua_gettop(L) - amount - 1; return ret >= 0 ? ret : 0; } diff --git a/src/mime.c b/src/mime.c index dd37dcf..e59e6dd 100644 --- a/src/mime.c +++ b/src/mime.c @@ -661,7 +661,7 @@ static int eolprocess(int c, int last, const char *marker, \*-------------------------------------------------------------------------*/ static int mime_global_eol(lua_State *L) { - int ctx = luaL_checkint(L, 1); + int ctx = (int)luaL_checkinteger(L, 1); size_t isize = 0; const char *input = luaL_optlstring(L, 2, NULL, &isize); const char *last = input + isize;