diff options
Diffstat (limited to 'meta-multimedia/recipes-multimedia/vlc/vlc/0008-fix-luaL-checkint.patch')
-rw-r--r-- | meta-multimedia/recipes-multimedia/vlc/vlc/0008-fix-luaL-checkint.patch | 234 |
1 files changed, 94 insertions, 140 deletions
diff --git a/meta-multimedia/recipes-multimedia/vlc/vlc/0008-fix-luaL-checkint.patch b/meta-multimedia/recipes-multimedia/vlc/vlc/0008-fix-luaL-checkint.patch index 145e1ab82..96b5d2d24 100644 --- a/meta-multimedia/recipes-multimedia/vlc/vlc/0008-fix-luaL-checkint.patch +++ b/meta-multimedia/recipes-multimedia/vlc/vlc/0008-fix-luaL-checkint.patch | |||
@@ -5,46 +5,29 @@ Upstream-status: Pending | |||
5 | 5 | ||
6 | Signed-off-by: Tim Orling <TicoTimo@gmail.com> | 6 | Signed-off-by: Tim Orling <TicoTimo@gmail.com> |
7 | 7 | ||
8 | Index: vlc-2.2.1/modules/lua/demux.c | 8 | --- a/modules/lua/demux.c |
9 | =================================================================== | 9 | +++ b/modules/lua/demux.c |
10 | --- vlc-2.2.1.orig/modules/lua/demux.c | 10 | @@ -52,7 +52,7 @@ struct vlclua_playlist |
11 | +++ vlc-2.2.1/modules/lua/demux.c | ||
12 | @@ -52,7 +52,7 @@ struct demux_sys_t | ||
13 | static int vlclua_demux_peek( lua_State *L ) | 11 | static int vlclua_demux_peek( lua_State *L ) |
14 | { | 12 | { |
15 | demux_t *p_demux = (demux_t *)vlclua_get_this( L ); | 13 | stream_t *s = (stream_t *)vlclua_get_this(L); |
16 | - int n = luaL_checkint( L, 1 ); | 14 | - int n = luaL_checkint( L, 1 ); |
17 | + int n = luaL_checkinteger( L, 1 ); | 15 | + int n = luaL_checkinteger( L, 1 ); |
18 | const uint8_t *p_peek; | 16 | const uint8_t *p_peek; |
19 | 17 | ||
20 | int i_peek = stream_Peek( p_demux->s, &p_peek, n ); | 18 | ssize_t val = vlc_stream_Peek(s->p_source, &p_peek, n); |
21 | @@ -67,7 +67,7 @@ static int vlclua_demux_read( lua_State | 19 | @@ -66,7 +66,7 @@ static int vlclua_demux_peek( lua_State |
20 | static int vlclua_demux_read( lua_State *L ) | ||
22 | { | 21 | { |
23 | demux_t *p_demux = (demux_t *)vlclua_get_this( L ); | 22 | stream_t *s = (stream_t *)vlclua_get_this(L); |
24 | const uint8_t *p_read; | ||
25 | - int n = luaL_checkint( L, 1 ); | 23 | - int n = luaL_checkint( L, 1 ); |
26 | + int n = luaL_checkinteger( L, 1 ); | 24 | + int n = luaL_checkinteger( L, 1 ); |
27 | int i_read = stream_Peek( p_demux->s, &p_read, n ); | 25 | char *buf = malloc(n); |
28 | 26 | ||
29 | if( i_read > 0 ) | 27 | if (buf != NULL) |
30 | Index: vlc-2.2.1/modules/lua/libs/configuration.c | 28 | --- a/modules/lua/libs/net.c |
31 | =================================================================== | 29 | +++ b/modules/lua/libs/net.c |
32 | --- vlc-2.2.1.orig/modules/lua/libs/configuration.c | 30 | @@ -179,7 +179,7 @@ static int vlclua_net_listen_tcp( lua_St |
33 | +++ vlc-2.2.1/modules/lua/libs/configuration.c | ||
34 | @@ -84,7 +84,7 @@ static int vlclua_config_set( lua_State | ||
35 | break; | ||
36 | |||
37 | case VLC_VAR_INTEGER: | ||
38 | - config_PutInt( p_this, psz_name, luaL_checkint( L, 2 ) ); | ||
39 | + config_PutInt( p_this, psz_name, luaL_checkinteger( L, 2 ) ); | ||
40 | break; | ||
41 | |||
42 | case VLC_VAR_BOOL: | ||
43 | Index: vlc-2.2.1/modules/lua/libs/net.c | ||
44 | =================================================================== | ||
45 | --- vlc-2.2.1.orig/modules/lua/libs/net.c | ||
46 | +++ vlc-2.2.1/modules/lua/libs/net.c | ||
47 | @@ -202,7 +202,7 @@ static int vlclua_net_listen_tcp( lua_St | ||
48 | { | 31 | { |
49 | vlc_object_t *p_this = vlclua_get_this( L ); | 32 | vlc_object_t *p_this = vlclua_get_this( L ); |
50 | const char *psz_host = luaL_checkstring( L, 1 ); | 33 | const char *psz_host = luaL_checkstring( L, 1 ); |
@@ -53,16 +36,16 @@ Index: vlc-2.2.1/modules/lua/libs/net.c | |||
53 | int *pi_fd = net_ListenTCP( p_this, psz_host, i_port ); | 36 | int *pi_fd = net_ListenTCP( p_this, psz_host, i_port ); |
54 | if( pi_fd == NULL ) | 37 | if( pi_fd == NULL ) |
55 | return luaL_error( L, "Cannot listen on %s:%d", psz_host, i_port ); | 38 | return luaL_error( L, "Cannot listen on %s:%d", psz_host, i_port ); |
56 | @@ -274,7 +274,7 @@ static int vlclua_net_connect_tcp( lua_S | 39 | @@ -251,7 +251,7 @@ static int vlclua_net_connect_tcp( lua_S |
57 | { | 40 | { |
58 | vlc_object_t *p_this = vlclua_get_this( L ); | 41 | vlc_object_t *p_this = vlclua_get_this( L ); |
59 | const char *psz_host = luaL_checkstring( L, 1 ); | 42 | const char *psz_host = luaL_checkstring( L, 1 ); |
60 | - int i_port = luaL_checkint( L, 2 ); | 43 | - int i_port = luaL_checkint( L, 2 ); |
61 | + int i_port = luaL_checkinteger( L, 2 ); | 44 | + int i_port = luaL_checkinteger( L, 2 ); |
62 | int i_fd = net_Connect( p_this, psz_host, i_port, SOCK_STREAM, IPPROTO_TCP ); | 45 | int i_fd = net_ConnectTCP( p_this, psz_host, i_port ); |
63 | lua_pushinteger( L, vlclua_fd_map_safe( L, i_fd ) ); | 46 | lua_pushinteger( L, vlclua_fd_map_safe( L, i_fd ) ); |
64 | return 1; | 47 | return 1; |
65 | @@ -282,26 +282,26 @@ static int vlclua_net_connect_tcp( lua_S | 48 | @@ -259,14 +259,14 @@ static int vlclua_net_connect_tcp( lua_S |
66 | 49 | ||
67 | static int vlclua_net_close( lua_State *L ) | 50 | static int vlclua_net_close( lua_State *L ) |
68 | { | 51 | { |
@@ -79,22 +62,25 @@ Index: vlc-2.2.1/modules/lua/libs/net.c | |||
79 | size_t i_len; | 62 | size_t i_len; |
80 | const char *psz_buffer = luaL_checklstring( L, 2, &i_len ); | 63 | const char *psz_buffer = luaL_checklstring( L, 2, &i_len ); |
81 | 64 | ||
82 | - i_len = luaL_optint( L, 3, i_len ); | 65 | @@ -278,7 +278,7 @@ static int vlclua_net_send( lua_State *L |
83 | + i_len = luaL_optinteger( L, 3, i_len ); | ||
84 | lua_pushinteger( L, (fd != -1) ? send( fd, psz_buffer, i_len, 0 ) : -1 ); | ||
85 | return 1; | ||
86 | } | ||
87 | 66 | ||
88 | static int vlclua_net_recv( lua_State *L ) | 67 | static int vlclua_net_recv( lua_State *L ) |
89 | { | 68 | { |
90 | - int fd = vlclua_fd_get( L, luaL_checkint( L, 1 ) ); | 69 | - int fd = vlclua_fd_get( L, luaL_checkint( L, 1 ) ); |
91 | - size_t i_len = luaL_optint( L, 2, 1 ); | ||
92 | + int fd = vlclua_fd_get( L, luaL_checkinteger( L, 1 ) ); | 70 | + int fd = vlclua_fd_get( L, luaL_checkinteger( L, 1 ) ); |
93 | + size_t i_len = luaL_optinteger( L, 2, 1 ); | 71 | size_t i_len = (size_t)luaL_optinteger( L, 2, 1 ); |
94 | char psz_buffer[i_len]; | 72 | char psz_buffer[i_len]; |
95 | 73 | ||
96 | ssize_t i_ret = (fd != -1) ? recv( fd, psz_buffer, i_len, 0 ) : -1; | 74 | @@ -312,7 +312,7 @@ static int vlclua_net_poll( lua_State *L |
97 | @@ -382,19 +382,19 @@ static int vlclua_fd_open( lua_State *L | 75 | lua_pushnil( L ); |
76 | for( int i = 0; lua_next( L, 1 ); i++ ) | ||
77 | { | ||
78 | - luafds[i] = luaL_checkint( L, -2 ); | ||
79 | + luafds[i] = luaL_checkinteger( L, -2 ); | ||
80 | p_fds[i].fd = vlclua_fd_get( L, luafds[i] ); | ||
81 | p_fds[i].events = luaL_checkinteger( L, -1 ); | ||
82 | p_fds[i].events &= POLLIN | POLLOUT | POLLPRI; | ||
83 | @@ -360,7 +360,7 @@ static int vlclua_fd_open( lua_State *L | ||
98 | #ifndef _WIN32 | 84 | #ifndef _WIN32 |
99 | static int vlclua_fd_write( lua_State *L ) | 85 | static int vlclua_fd_write( lua_State *L ) |
100 | { | 86 | { |
@@ -103,47 +89,18 @@ Index: vlc-2.2.1/modules/lua/libs/net.c | |||
103 | size_t i_len; | 89 | size_t i_len; |
104 | const char *psz_buffer = luaL_checklstring( L, 2, &i_len ); | 90 | const char *psz_buffer = luaL_checklstring( L, 2, &i_len ); |
105 | 91 | ||
106 | - i_len = luaL_optint( L, 3, i_len ); | 92 | @@ -371,7 +371,7 @@ static int vlclua_fd_write( lua_State *L |
107 | + i_len = luaL_optinteger( L, 3, i_len ); | ||
108 | lua_pushinteger( L, (fd != -1) ? write( fd, psz_buffer, i_len ) : -1 ); | ||
109 | return 1; | ||
110 | } | ||
111 | 93 | ||
112 | static int vlclua_fd_read( lua_State *L ) | 94 | static int vlclua_fd_read( lua_State *L ) |
113 | { | 95 | { |
114 | - int fd = vlclua_fd_get( L, luaL_checkint( L, 1 ) ); | 96 | - int fd = vlclua_fd_get( L, luaL_checkint( L, 1 ) ); |
115 | - size_t i_len = luaL_optint( L, 2, 1 ); | ||
116 | + int fd = vlclua_fd_get( L, luaL_checkinteger( L, 1 ) ); | 97 | + int fd = vlclua_fd_get( L, luaL_checkinteger( L, 1 ) ); |
117 | + size_t i_len = luaL_optinteger( L, 2, 1 ); | 98 | size_t i_len = (size_t)luaL_optinteger( L, 2, 1 ); |
118 | char psz_buffer[i_len]; | 99 | char psz_buffer[i_len]; |
119 | 100 | ||
120 | ssize_t i_ret = (fd != -1) ? read( fd, psz_buffer, i_len ) : -1; | 101 | --- a/modules/lua/libs/osd.c |
121 | Index: vlc-2.2.1/modules/lua/libs/osd.c | 102 | +++ b/modules/lua/libs/osd.c |
122 | =================================================================== | 103 | @@ -154,7 +154,7 @@ static int vlc_osd_slider_type_from_stri |
123 | --- vlc-2.2.1.orig/modules/lua/libs/osd.c | ||
124 | +++ vlc-2.2.1/modules/lua/libs/osd.c | ||
125 | @@ -67,7 +67,7 @@ static int vlclua_osd_icon( lua_State *L | ||
126 | { | ||
127 | const char *psz_icon = luaL_checkstring( L, 1 ); | ||
128 | int i_icon = vlc_osd_icon_from_string( psz_icon ); | ||
129 | - int i_chan = luaL_optint( L, 2, SPU_DEFAULT_CHANNEL ); | ||
130 | + int i_chan = luaL_optinteger( L, 2, SPU_DEFAULT_CHANNEL ); | ||
131 | if( !i_icon ) | ||
132 | return luaL_error( L, "\"%s\" is not a valid osd icon.", psz_icon ); | ||
133 | |||
134 | @@ -114,9 +114,9 @@ static int vlc_osd_position_from_string( | ||
135 | static int vlclua_osd_message( lua_State *L ) | ||
136 | { | ||
137 | const char *psz_message = luaL_checkstring( L, 1 ); | ||
138 | - int i_chan = luaL_optint( L, 2, SPU_DEFAULT_CHANNEL ); | ||
139 | + int i_chan = luaL_optinteger( L, 2, SPU_DEFAULT_CHANNEL ); | ||
140 | const char *psz_position = luaL_optstring( L, 3, "top-right" ); | ||
141 | - mtime_t duration = luaL_optint( L, 4, 1000000 ); | ||
142 | + mtime_t duration = luaL_optinteger( L, 4, 1000000 ); | ||
143 | |||
144 | input_thread_t *p_input = vlclua_get_input_internal( L ); | ||
145 | if( p_input ) | ||
146 | @@ -154,10 +154,10 @@ static int vlc_osd_slider_type_from_stri | ||
147 | 104 | ||
148 | static int vlclua_osd_slider( lua_State *L ) | 105 | static int vlclua_osd_slider( lua_State *L ) |
149 | { | 106 | { |
@@ -151,11 +108,7 @@ Index: vlc-2.2.1/modules/lua/libs/osd.c | |||
151 | + int i_position = luaL_checkinteger( L, 1 ); | 108 | + int i_position = luaL_checkinteger( L, 1 ); |
152 | const char *psz_type = luaL_checkstring( L, 2 ); | 109 | const char *psz_type = luaL_checkstring( L, 2 ); |
153 | int i_type = vlc_osd_slider_type_from_string( psz_type ); | 110 | int i_type = vlc_osd_slider_type_from_string( psz_type ); |
154 | - int i_chan = luaL_optint( L, 3, SPU_DEFAULT_CHANNEL ); | 111 | int i_chan = (int)luaL_optinteger( L, 3, VOUT_SPU_CHANNEL_OSD ); |
155 | + int i_chan = luaL_optinteger( L, 3, SPU_DEFAULT_CHANNEL ); | ||
156 | if( !i_type ) | ||
157 | return luaL_error( L, "\"%s\" is not a valid slider type.", | ||
158 | psz_type ); | ||
159 | @@ -198,7 +198,7 @@ static int vlclua_spu_channel_register( | 112 | @@ -198,7 +198,7 @@ static int vlclua_spu_channel_register( |
160 | 113 | ||
161 | static int vlclua_spu_channel_clear( lua_State *L ) | 114 | static int vlclua_spu_channel_clear( lua_State *L ) |
@@ -165,10 +118,8 @@ Index: vlc-2.2.1/modules/lua/libs/osd.c | |||
165 | input_thread_t *p_input = vlclua_get_input_internal( L ); | 118 | input_thread_t *p_input = vlclua_get_input_internal( L ); |
166 | if( !p_input ) | 119 | if( !p_input ) |
167 | return luaL_error( L, "Unable to find input." ); | 120 | return luaL_error( L, "Unable to find input." ); |
168 | Index: vlc-2.2.1/modules/lua/libs/playlist.c | 121 | --- a/modules/lua/libs/playlist.c |
169 | =================================================================== | 122 | +++ b/modules/lua/libs/playlist.c |
170 | --- vlc-2.2.1.orig/modules/lua/libs/playlist.c | ||
171 | +++ vlc-2.2.1/modules/lua/libs/playlist.c | ||
172 | @@ -69,7 +69,7 @@ static int vlclua_playlist_next( lua_Sta | 123 | @@ -69,7 +69,7 @@ static int vlclua_playlist_next( lua_Sta |
173 | 124 | ||
174 | static int vlclua_playlist_skip( lua_State * L ) | 125 | static int vlclua_playlist_skip( lua_State * L ) |
@@ -186,17 +137,17 @@ Index: vlc-2.2.1/modules/lua/libs/playlist.c | |||
186 | + int i_id = luaL_checkinteger( L, 1 ); | 137 | + int i_id = luaL_checkinteger( L, 1 ); |
187 | playlist_t *p_playlist = vlclua_get_playlist_internal( L ); | 138 | playlist_t *p_playlist = vlclua_get_playlist_internal( L ); |
188 | PL_LOCK; | 139 | PL_LOCK; |
189 | int i_ret = playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, | 140 | playlist_ViewPlay( p_playlist, NULL, |
190 | @@ -139,7 +139,7 @@ static int vlclua_playlist_gotoitem( lua | 141 | @@ -138,7 +138,7 @@ static int vlclua_playlist_gotoitem( lua |
191 | 142 | ||
192 | static int vlclua_playlist_delete( lua_State * L ) | 143 | static int vlclua_playlist_delete( lua_State * L ) |
193 | { | 144 | { |
194 | - int i_id = luaL_checkint( L, 1 ); | 145 | - int i_id = luaL_checkint( L, 1 ); |
195 | + int i_id = luaL_checkinteger( L, 1 ); | 146 | + int i_id = luaL_checkinteger( L, 1 ); |
196 | playlist_t *p_playlist = vlclua_get_playlist_internal( L ); | 147 | playlist_t *p_playlist = vlclua_get_playlist_internal( L ); |
148 | |||
197 | PL_LOCK; | 149 | PL_LOCK; |
198 | playlist_item_t *p_item = playlist_ItemGetById( p_playlist, i_id ); | 150 | @@ -152,8 +152,8 @@ static int vlclua_playlist_delete( lua_S |
199 | @@ -155,8 +155,8 @@ static int vlclua_playlist_delete( lua_S | ||
200 | 151 | ||
201 | static int vlclua_playlist_move( lua_State * L ) | 152 | static int vlclua_playlist_move( lua_State * L ) |
202 | { | 153 | { |
@@ -207,11 +158,9 @@ Index: vlc-2.2.1/modules/lua/libs/playlist.c | |||
207 | playlist_t *p_playlist = vlclua_get_playlist_internal( L ); | 158 | playlist_t *p_playlist = vlclua_get_playlist_internal( L ); |
208 | PL_LOCK; | 159 | PL_LOCK; |
209 | playlist_item_t *p_item = playlist_ItemGetById( p_playlist, i_item ); | 160 | playlist_item_t *p_item = playlist_ItemGetById( p_playlist, i_item ); |
210 | Index: vlc-2.2.1/modules/lua/libs/stream.c | 161 | --- a/modules/lua/libs/stream.c |
211 | =================================================================== | 162 | +++ b/modules/lua/libs/stream.c |
212 | --- vlc-2.2.1.orig/modules/lua/libs/stream.c | 163 | @@ -123,7 +123,7 @@ static int vlclua_stream_read( lua_State |
213 | +++ vlc-2.2.1/modules/lua/libs/stream.c | ||
214 | @@ -101,7 +101,7 @@ static int vlclua_stream_read( lua_State | ||
215 | { | 164 | { |
216 | int i_read; | 165 | int i_read; |
217 | stream_t **pp_stream = (stream_t **)luaL_checkudata( L, 1, "stream" ); | 166 | stream_t **pp_stream = (stream_t **)luaL_checkudata( L, 1, "stream" ); |
@@ -220,23 +169,8 @@ Index: vlc-2.2.1/modules/lua/libs/stream.c | |||
220 | uint8_t *p_read = malloc( n ); | 169 | uint8_t *p_read = malloc( n ); |
221 | if( !p_read ) return vlclua_error( L ); | 170 | if( !p_read ) return vlclua_error( L ); |
222 | 171 | ||
223 | Index: vlc-2.2.1/modules/lua/libs/variables.c | 172 | --- a/modules/lua/libs/volume.c |
224 | =================================================================== | 173 | +++ b/modules/lua/libs/volume.c |
225 | --- vlc-2.2.1.orig/modules/lua/libs/variables.c | ||
226 | +++ vlc-2.2.1/modules/lua/libs/variables.c | ||
227 | @@ -103,7 +103,7 @@ static int vlclua_tovalue( lua_State *L, | ||
228 | val->b_bool = luaL_checkboolean( L, -1 ); | ||
229 | break; | ||
230 | case VLC_VAR_INTEGER: | ||
231 | - val->i_int = luaL_checkint( L, -1 ); | ||
232 | + val->i_int = luaL_checkinteger( L, -1 ); | ||
233 | break; | ||
234 | case VLC_VAR_STRING: | ||
235 | val->psz_string = (char*)luaL_checkstring( L, -1 ); /* XXX: Beware, this only stays valid as long as (L,-1) stays in the stack */ | ||
236 | Index: vlc-2.2.1/modules/lua/libs/volume.c | ||
237 | =================================================================== | ||
238 | --- vlc-2.2.1.orig/modules/lua/libs/volume.c | ||
239 | +++ vlc-2.2.1/modules/lua/libs/volume.c | ||
240 | @@ -48,7 +48,7 @@ | 174 | @@ -48,7 +48,7 @@ |
241 | static int vlclua_volume_set( lua_State *L ) | 175 | static int vlclua_volume_set( lua_State *L ) |
242 | { | 176 | { |
@@ -246,34 +180,54 @@ Index: vlc-2.2.1/modules/lua/libs/volume.c | |||
246 | if( i_volume < 0 ) | 180 | if( i_volume < 0 ) |
247 | i_volume = 0; | 181 | i_volume = 0; |
248 | int i_ret = playlist_VolumeSet( p_this, i_volume/(float)AOUT_VOLUME_DEFAULT ); | 182 | int i_ret = playlist_VolumeSet( p_this, i_volume/(float)AOUT_VOLUME_DEFAULT ); |
249 | @@ -68,7 +68,7 @@ static int vlclua_volume_up( lua_State * | 183 | --- a/modules/lua/libs/dialog.c |
250 | playlist_t *p_this = vlclua_get_playlist_internal( L ); | 184 | +++ b/modules/lua/libs/dialog.c |
251 | float volume; | 185 | @@ -382,7 +382,7 @@ static int lua_GetDialogUpdate( lua_Stat |
252 | 186 | /* Read entry in the Lua registry */ | |
253 | - playlist_VolumeUp( p_this, luaL_optint( L, 1, 1 ), &volume ); | 187 | lua_pushlightuserdata( L, (void*) &key_update ); |
254 | + playlist_VolumeUp( p_this, luaL_optinteger( L, 1, 1 ), &volume ); | 188 | lua_gettable( L, LUA_REGISTRYINDEX ); |
255 | lua_pushnumber( L, lroundf(volume * AOUT_VOLUME_DEFAULT) ); | 189 | - return luaL_checkint( L, -1 ); |
256 | return 1; | 190 | + return luaL_checkinteger( L, -1 ); |
257 | } | ||
258 | @@ -78,7 +78,7 @@ static int vlclua_volume_down( lua_State | ||
259 | playlist_t *p_this = vlclua_get_playlist_internal( L ); | ||
260 | float volume; | ||
261 | |||
262 | - playlist_VolumeDown( p_this, luaL_optint( L, 1, 1 ), &volume ); | ||
263 | + playlist_VolumeDown( p_this, luaL_optinteger( L, 1, 1 ), &volume ); | ||
264 | lua_pushnumber( L, lroundf(volume * AOUT_VOLUME_DEFAULT) ); | ||
265 | return 1; | ||
266 | } | 191 | } |
267 | Index: vlc-2.2.1/modules/lua/libs/win.c | ||
268 | =================================================================== | ||
269 | --- vlc-2.2.1.orig/modules/lua/libs/win.c | ||
270 | +++ vlc-2.2.1/modules/lua/libs/win.c | ||
271 | @@ -123,7 +123,7 @@ static int vlclua_console_init( lua_Stat | ||
272 | 192 | ||
273 | static int vlclua_console_wait( lua_State *L ) | 193 | /** Manually update a dialog |
274 | { | 194 | @@ -573,22 +573,22 @@ static int vlclua_create_widget_inner( l |
275 | - int i_timeout = luaL_optint( L, 1, 0 ); | 195 | |
276 | + int i_timeout = luaL_optinteger( L, 1, 0 ); | 196 | /* Set common arguments: col, row, hspan, vspan, width, height */ |
277 | DWORD status = WaitForSingleObject( GetConsole( L ), i_timeout ); | 197 | if( lua_isnumber( L, arg ) ) |
278 | lua_pushboolean( L, status == WAIT_OBJECT_0 ); | 198 | - p_widget->i_column = luaL_checkint( L, arg ); |
279 | return 1; | 199 | + p_widget->i_column = luaL_checkinteger( L, arg ); |
200 | else goto end_of_args; | ||
201 | if( lua_isnumber( L, ++arg ) ) | ||
202 | - p_widget->i_row = luaL_checkint( L, arg ); | ||
203 | + p_widget->i_row = luaL_checkinteger( L, arg ); | ||
204 | else goto end_of_args; | ||
205 | if( lua_isnumber( L, ++arg ) ) | ||
206 | - p_widget->i_horiz_span = luaL_checkint( L, arg ); | ||
207 | + p_widget->i_horiz_span = luaL_checkinteger( L, arg ); | ||
208 | else goto end_of_args; | ||
209 | if( lua_isnumber( L, ++arg ) ) | ||
210 | - p_widget->i_vert_span = luaL_checkint( L, arg ); | ||
211 | + p_widget->i_vert_span = luaL_checkinteger( L, arg ); | ||
212 | else goto end_of_args; | ||
213 | if( lua_isnumber( L, ++arg ) ) | ||
214 | - p_widget->i_width = luaL_checkint( L, arg ); | ||
215 | + p_widget->i_width = luaL_checkinteger( L, arg ); | ||
216 | else goto end_of_args; | ||
217 | if( lua_isnumber( L, ++arg ) ) | ||
218 | - p_widget->i_height = luaL_checkint( L, arg ); | ||
219 | + p_widget->i_height = luaL_checkinteger( L, arg ); | ||
220 | else goto end_of_args; | ||
221 | |||
222 | end_of_args: | ||
223 | --- a/modules/lua/libs/io.c | ||
224 | +++ b/modules/lua/libs/io.c | ||
225 | @@ -139,7 +139,7 @@ static int vlclua_io_file_seek( lua_Stat | ||
226 | const char* psz_mode = luaL_optstring( L, 2, NULL ); | ||
227 | if ( psz_mode != NULL ) | ||
228 | { | ||
229 | - long i_offset = luaL_optlong( L, 3, 0 ); | ||
230 | + long i_offset = (long)luaL_optinteger( L, 3, 0 ); | ||
231 | int i_mode; | ||
232 | if ( !strcmp( psz_mode, "set" ) ) | ||
233 | i_mode = SEEK_SET; | ||