<html dir="ltr"><head></head><body style="text-align:left; direction:ltr;"><div>On Sat, 2018-11-17 at 13:53 +0100, Lukas Bergdoll wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><pre>---</pre><pre> modules/lua/demux.c         |  4 ++--</pre><pre> modules/lua/libs/dialog.c   | 14 +++++++-------</pre><pre> modules/lua/libs/io.c       |  2 +-</pre><pre> modules/lua/libs/net.c      | 16 ++++++++--------</pre><pre> modules/lua/libs/osd.c      |  4 ++--</pre><pre> modules/lua/libs/playlist.c | 10 +++++-----</pre><pre> modules/lua/libs/stream.c   |  2 +-</pre><pre> modules/lua/libs/volume.c   |  2 +-</pre><pre> 8 files changed, 27 insertions(+), 27 deletions(-)</pre><pre><br></pre><pre>diff --git a/modules/lua/demux.c b/modules/lua/demux.c</pre><pre>index 677175bfb6..cfce8aa8e3 100644</pre><pre>--- a/modules/lua/demux.c</pre><pre>+++ b/modules/lua/demux.c</pre><pre>@@ -52,7 +52,7 @@ struct vlclua_playlist</pre><pre> static int vlclua_demux_peek( lua_State *L )</pre><pre> {</pre><pre>     stream_t *s = (stream_t *)vlclua_get_this(L);</pre><pre>-    int n = luaL_checkint( L, 1 );</pre><pre>+    int n = luaL_checkinteger( L, 1 );</pre><pre>     const uint8_t *p_peek;</pre><pre> </pre><pre>     ssize_t val = vlc_stream_Peek(s->s, &p_peek, n);</pre><pre>@@ -66,7 +66,7 @@ static int vlclua_demux_peek( lua_State *L )</pre><pre> static int vlclua_demux_read( lua_State *L )</pre><pre> {</pre><pre>     stream_t *s = (stream_t *)vlclua_get_this(L);</pre><pre>-    int n = luaL_checkint( L, 1 );</pre><pre>+    int n = luaL_checkinteger( L, 1 );</pre><pre>     char *buf = malloc(n);</pre><pre> </pre><pre>     if (buf != NULL)</pre><pre>diff --git a/modules/lua/libs/dialog.c b/modules/lua/libs/dialog.c</pre><pre>index 8a74b18262..576865a4fd 100644</pre><pre>--- a/modules/lua/libs/dialog.c</pre><pre>+++ b/modules/lua/libs/dialog.c</pre><pre>@@ -381,7 +381,7 @@ static int lua_GetDialogUpdate( lua_State *L )</pre><pre>     /* Read entry in the Lua registry */</pre><pre>     lua_pushlightuserdata( L, (void*) &key_update );</pre><pre>     lua_gettable( L, LUA_REGISTRYINDEX );</pre><pre>-    return luaL_checkint( L, -1 );</pre><pre>+    return luaL_checkinteger( L, -1 );</pre><pre> }</pre><pre> </pre><pre> /** Manually update a dialog</pre><pre>@@ -572,22 +572,22 @@ static int vlclua_create_widget_inner( lua_State *L, int i_args,</pre><pre> </pre><pre>     /* Set common arguments: col, row, hspan, vspan, width, height */</pre><pre>     if( lua_isnumber( L, arg ) )</pre><pre>-        p_widget->i_column = luaL_checkint( L, arg );</pre><pre>+        p_widget->i_column = luaL_checkinteger( L, arg );</pre><pre>     else goto end_of_args;</pre><pre>     if( lua_isnumber( L, ++arg ) )</pre><pre>-        p_widget->i_row = luaL_checkint( L, arg );</pre><pre>+        p_widget->i_row = luaL_checkinteger( L, arg );</pre><pre>     else goto end_of_args;</pre><pre>     if( lua_isnumber( L, ++arg ) )</pre><pre>-        p_widget->i_horiz_span = luaL_checkint( L, arg );</pre><pre>+        p_widget->i_horiz_span = luaL_checkinteger( L, arg );</pre><pre>     else goto end_of_args;</pre><pre>     if( lua_isnumber( L, ++arg ) )</pre><pre>-        p_widget->i_vert_span = luaL_checkint( L, arg );</pre><pre>+        p_widget->i_vert_span = luaL_checkinteger( L, arg );</pre><pre>     else goto end_of_args;</pre><pre>     if( lua_isnumber( L, ++arg ) )</pre><pre>-        p_widget->i_width = luaL_checkint( L, arg );</pre><pre>+        p_widget->i_width = luaL_checkinteger( L, arg );</pre><pre>     else goto end_of_args;</pre><pre>     if( lua_isnumber( L, ++arg ) )</pre><pre>-        p_widget->i_height = luaL_checkint( L, arg );</pre><pre>+        p_widget->i_height = luaL_checkinteger( L, arg );</pre><pre>     else goto end_of_args;</pre><pre> </pre><pre> end_of_args:</pre><pre>diff --git a/modules/lua/libs/io.c b/modules/lua/libs/io.c</pre><pre>index c01cf7137d..12267e1822 100644</pre><pre>--- a/modules/lua/libs/io.c</pre><pre>+++ b/modules/lua/libs/io.c</pre><pre>@@ -139,7 +139,7 @@ static int vlclua_io_file_seek( lua_State *L )</pre><pre>     const char* psz_mode = luaL_optstring( L, 2, NULL );</pre><pre>     if ( psz_mode != NULL )</pre><pre>     {</pre><pre>-        long i_offset = luaL_optlong( L, 3, 0 );</pre><pre>+        long i_offset = luaL_optinteger( L, 3, 0 );</pre><pre>         int i_mode;</pre><pre>         if ( !strcmp( psz_mode, "set" ) )</pre><pre>             i_mode = SEEK_SET;</pre><pre>diff --git a/modules/lua/libs/net.c b/modules/lua/libs/net.c</pre><pre>index 5e10ee4860..8feba3d7b5 100644</pre><pre>--- a/modules/lua/libs/net.c</pre><pre>+++ b/modules/lua/libs/net.c</pre><pre>@@ -179,7 +179,7 @@ static int vlclua_net_listen_tcp( lua_State *L )</pre><pre> {</pre><pre>     vlc_object_t *p_this = vlclua_get_this( L );</pre><pre>     const char *psz_host = luaL_checkstring( L, 1 );</pre><pre>-    int i_port = luaL_checkint( L, 2 );</pre><pre>+    int i_port = luaL_checkinteger( L, 2 );</pre><pre>     int *pi_fd = net_ListenTCP( p_this, psz_host, i_port );</pre><pre>     if( pi_fd == NULL )</pre><pre>         return luaL_error( L, "Cannot listen on %s:%d", psz_host, i_port );</pre><pre>@@ -251,7 +251,7 @@ static int vlclua_net_connect_tcp( lua_State *L )</pre><pre> {</pre><pre>     vlc_object_t *p_this = vlclua_get_this( L );</pre><pre>     const char *psz_host = luaL_checkstring( L, 1 );</pre><pre>-    int i_port = luaL_checkint( L, 2 );</pre><pre>+    int i_port = luaL_checkinteger( L, 2 );</pre><pre>     int i_fd = net_ConnectTCP( p_this, psz_host, i_port );</pre><pre>     lua_pushinteger( L, vlclua_fd_map_safe( L, i_fd ) );</pre><pre>     return 1;</pre><pre>@@ -259,14 +259,14 @@ static int vlclua_net_connect_tcp( lua_State *L )</pre><pre> </pre><pre> static int vlclua_net_close( lua_State *L )</pre><pre> {</pre><pre>-    int i_fd = luaL_checkint( L, 1 );</pre><pre>+    int i_fd = luaL_checkinteger( L, 1 );</pre><pre>     vlclua_fd_unmap_safe( L, i_fd );</pre><pre>     return 0;</pre><pre> }</pre><pre> </pre><pre> static int vlclua_net_send( lua_State *L )</pre><pre> {</pre><pre>-    int fd = vlclua_fd_get( L, luaL_checkint( L, 1 ) );</pre><pre>+    int fd = vlclua_fd_get( L, luaL_checkinteger( L, 1 ) );</pre><pre>     size_t i_len;</pre><pre>     const char *psz_buffer = luaL_checklstring( L, 2, &i_len );</pre><pre> </pre><pre>@@ -278,7 +278,7 @@ static int vlclua_net_send( lua_State *L )</pre><pre> </pre><pre> static int vlclua_net_recv( lua_State *L )</pre><pre> {</pre><pre>-    int fd = vlclua_fd_get( L, luaL_checkint( L, 1 ) );</pre><pre>+    int fd = vlclua_fd_get( L, luaL_checkinteger( L, 1 ) );</pre><pre>     size_t i_len = (size_t)luaL_optinteger( L, 2, 1 );</pre><pre>     char psz_buffer[i_len];</pre><pre> </pre><pre>@@ -312,7 +312,7 @@ static int vlclua_net_poll( lua_State *L )</pre><pre>     lua_pushnil( L );</pre><pre>     for( int i = 0; lua_next( L, 1 ); i++ )</pre><pre>     {</pre><pre>-        luafds[i] = luaL_checkint( L, -2 );</pre><pre>+        luafds[i] = luaL_checkinteger( L, -2 );</pre><pre>         p_fds[i].fd = vlclua_fd_get( L, luafds[i] );</pre><pre>         p_fds[i].events = luaL_checkinteger( L, -1 );</pre><pre>         p_fds[i].events &= POLLIN | POLLOUT | POLLPRI;</pre><pre>@@ -360,7 +360,7 @@ static int vlclua_fd_open( lua_State *L )</pre><pre> #ifndef _WIN32</pre><pre> static int vlclua_fd_write( lua_State *L )</pre><pre> {</pre><pre>-    int fd = vlclua_fd_get( L, luaL_checkint( L, 1 ) );</pre><pre>+    int fd = vlclua_fd_get( L, luaL_checkinteger( L, 1 ) );</pre><pre>     size_t i_len;</pre><pre>     const char *psz_buffer = luaL_checklstring( L, 2, &i_len );</pre><pre> </pre><pre>@@ -371,7 +371,7 @@ static int vlclua_fd_write( lua_State *L )</pre><pre> </pre><pre> static int vlclua_fd_read( lua_State *L )</pre><pre> {</pre><pre>-    int fd = vlclua_fd_get( L, luaL_checkint( L, 1 ) );</pre><pre>+    int fd = vlclua_fd_get( L, luaL_checkinteger( L, 1 ) );</pre><pre>     size_t i_len = (size_t)luaL_optinteger( L, 2, 1 );</pre><pre>     char psz_buffer[i_len];</pre><pre> </pre><pre>diff --git a/modules/lua/libs/osd.c b/modules/lua/libs/osd.c</pre><pre>index bc59ac9470..73126eb1a5 100644</pre><pre>--- a/modules/lua/libs/osd.c</pre><pre>+++ b/modules/lua/libs/osd.c</pre><pre>@@ -154,7 +154,7 @@ static int vlc_osd_slider_type_from_string( const char *psz_name )</pre><pre> </pre><pre> static int vlclua_osd_slider( lua_State *L )</pre><pre> {</pre><pre>-    int i_position = luaL_checkint( L, 1 );</pre><pre>+    int i_position = luaL_checkinteger( L, 1 );</pre><pre>     const char *psz_type = luaL_checkstring( L, 2 );</pre><pre>     int i_type = vlc_osd_slider_type_from_string( psz_type );</pre><pre>     int i_chan = (int)luaL_optinteger( L, 3, VOUT_SPU_CHANNEL_OSD );</pre><pre>@@ -198,7 +198,7 @@ static int vlclua_spu_channel_register( lua_State *L )</pre><pre> </pre><pre> static int vlclua_spu_channel_clear( lua_State *L )</pre><pre> {</pre><pre>-    int i_chan = luaL_checkint( L, 1 );</pre><pre>+    int i_chan = luaL_checkinteger( L, 1 );</pre><pre>     input_thread_t *p_input = vlclua_get_input_internal( L );</pre><pre>     if( !p_input )</pre><pre>         return luaL_error( L, "Unable to find input." );</pre><pre>diff --git a/modules/lua/libs/playlist.c b/modules/lua/libs/playlist.c</pre><pre>index e6ba0eed24..e81259b87f 100644</pre><pre>--- a/modules/lua/libs/playlist.c</pre><pre>+++ b/modules/lua/libs/playlist.c</pre><pre>@@ -69,7 +69,7 @@ static int vlclua_playlist_next( lua_State * L )</pre><pre> </pre><pre> static int vlclua_playlist_skip( lua_State * L )</pre><pre> {</pre><pre>-    int i_skip = luaL_checkint( L, 1 );</pre><pre>+    int i_skip = luaL_checkinteger( L, 1 );</pre><pre>     playlist_t *p_playlist = vlclua_get_playlist_internal( L );</pre><pre>     playlist_Skip( p_playlist, i_skip );</pre><pre>     return 0;</pre><pre>@@ -127,7 +127,7 @@ static int vlclua_playlist_random( lua_State * L )</pre><pre> </pre><pre> static int vlclua_playlist_gotoitem( lua_State * L )</pre><pre> {</pre><pre>-    int i_id = luaL_checkint( L, 1 );</pre><pre>+    int i_id = luaL_checkinteger( L, 1 );</pre><pre>     playlist_t *p_playlist = vlclua_get_playlist_internal( L );</pre><pre>     PL_LOCK;</pre><pre>     playlist_ViewPlay( p_playlist, NULL,</pre><pre>@@ -138,7 +138,7 @@ static int vlclua_playlist_gotoitem( lua_State * L )</pre><pre> </pre><pre> static int vlclua_playlist_delete( lua_State * L )</pre><pre> {</pre><pre>-    int i_id = luaL_checkint( L, 1 );</pre><pre>+    int i_id = luaL_checkinteger( L, 1 );</pre><pre>     playlist_t *p_playlist = vlclua_get_playlist_internal( L );</pre><pre> </pre><pre>     PL_LOCK;</pre><pre>@@ -152,8 +152,8 @@ static int vlclua_playlist_delete( lua_State * L )</pre><pre> </pre><pre> static int vlclua_playlist_move( lua_State * L )</pre><pre> {</pre><pre>-    int i_item = luaL_checkint( L, 1 );</pre><pre>-    int i_target = luaL_checkint( L, 2 );</pre><pre>+    int i_item = luaL_checkinteger( L, 1 );</pre><pre>+    int i_target = luaL_checkinteger( L, 2 );</pre><pre>     playlist_t *p_playlist = vlclua_get_playlist_internal( L );</pre><pre>     PL_LOCK;</pre><pre>     playlist_item_t *p_item = playlist_ItemGetById( p_playlist, i_item );</pre><pre>diff --git a/modules/lua/libs/stream.c b/modules/lua/libs/stream.c</pre><pre>index 7f3f3e12b6..3b8b06e94c 100644</pre><pre>--- a/modules/lua/libs/stream.c</pre><pre>+++ b/modules/lua/libs/stream.c</pre><pre>@@ -123,7 +123,7 @@ static int vlclua_stream_read( lua_State *L )</pre><pre> {</pre><pre>     int i_read;</pre><pre>     stream_t **pp_stream = (stream_t **)luaL_checkudata( L, 1, "stream" );</pre><pre>-    int n = luaL_checkint( L, 2 );</pre><pre>+    int n = luaL_checkinteger( L, 2 );</pre><pre>     uint8_t *p_read = malloc( n );</pre><pre>     if( !p_read ) return vlclua_error( L );</pre><pre> </pre><pre>diff --git a/modules/lua/libs/volume.c b/modules/lua/libs/volume.c</pre><pre>index a060b883e7..f451754f52 100644</pre><pre>--- a/modules/lua/libs/volume.c</pre><pre>+++ b/modules/lua/libs/volume.c</pre><pre>@@ -49,7 +49,7 @@</pre><pre> static int vlclua_volume_set( lua_State *L )</pre><pre> {</pre><pre>     playlist_t *p_this = vlclua_get_playlist_internal( L );</pre><pre>-    int i_volume = luaL_checkint( L, 1 );</pre><pre>+    int i_volume = luaL_checkinteger( L, 1 );</pre><pre>     if( i_volume < 0 )</pre><pre>         i_volume = 0;</pre><pre>     int i_ret = playlist_VolumeSet( p_this, i_volume/(float)AOUT_VOLUME_DEFAULT );</pre></blockquote><div><br></div><div>LGTM</div><div><br></div><div><span><pre>-- <br></pre><div style="width: 71ch;">Regards,</div><div style="width: 71ch;">Shaleen Jain</div></span></div></body></html>