diff --git modules/lua/demux.c modules/lua/demux.c
index b732eebd927ebc6f1153ab092066c87fed812078..dea68fae3756f3dc7ffdf75af87b4f201e2d8dfe 100644
@@ -52,7 +52,7 @@ struct demux_sys_t
static int vlclua_demux_peek( lua_State *L )
demux_t *p_demux = (demux_t *)vlclua_get_this( L );
- int n = luaL_checkint( L, 1 );
+ int n = luaL_checkinteger( L, 1 );
int i_peek = stream_Peek( p_demux->s, &p_peek, n );
@@ -67,7 +67,7 @@ static int vlclua_demux_read( lua_State *L )
demux_t *p_demux = (demux_t *)vlclua_get_this( L );
- int n = luaL_checkint( L, 1 );
+ int n = luaL_checkinteger( L, 1 );
int i_read = stream_Peek( p_demux->s, &p_read, n );
diff --git modules/lua/libs/configuration.c modules/lua/libs/configuration.c
index 7394e52790373d66afb191785b1505b1b9df9d15..41d0a20c4a12ce1ebec1ee9146235987550526f7 100644
--- modules/lua/libs/configuration.c
+++ modules/lua/libs/configuration.c
@@ -84,7 +84,7 @@ static int vlclua_config_set( lua_State *L )
- config_PutInt( p_this, psz_name, luaL_checkint( L, 2 ) );
+ config_PutInt( p_this, psz_name, luaL_checkinteger( L, 2 ) );
diff --git modules/lua/libs/net.c modules/lua/libs/net.c
index 92d7b586d6808db0640f60097c1fa70be3b5a6d8..2a5351071b4fa7937e9756bf2ed998ec2a830529 100644
--- modules/lua/libs/net.c
+++ modules/lua/libs/net.c
@@ -202,7 +202,7 @@ static int vlclua_net_listen_tcp( lua_State *L )
vlc_object_t *p_this = vlclua_get_this( L );
const char *psz_host = luaL_checkstring( L, 1 );
- int i_port = luaL_checkint( L, 2 );
+ int i_port = luaL_checkinteger( L, 2 );
int *pi_fd = net_ListenTCP( p_this, psz_host, i_port );
return luaL_error( L, "Cannot listen on %s:%d", psz_host, i_port );
@@ -274,7 +274,7 @@ static int vlclua_net_connect_tcp( lua_State *L )
vlc_object_t *p_this = vlclua_get_this( L );
const char *psz_host = luaL_checkstring( L, 1 );
- int i_port = luaL_checkint( L, 2 );
+ int i_port = luaL_checkinteger( L, 2 );
int i_fd = net_Connect( p_this, psz_host, i_port, SOCK_STREAM, IPPROTO_TCP );
lua_pushinteger( L, vlclua_fd_map_safe( L, i_fd ) );
@@ -282,26 +282,26 @@ static int vlclua_net_connect_tcp( lua_State *L )
static int vlclua_net_close( lua_State *L )
- int i_fd = luaL_checkint( L, 1 );
+ int i_fd = luaL_checkinteger( L, 1 );