Commit bae1e6a0 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Lua: refactor

parent 2ca95bb1
...@@ -53,6 +53,12 @@ static vlclua_dtable_t *vlclua_get_dtable( lua_State *L ) ...@@ -53,6 +53,12 @@ static vlclua_dtable_t *vlclua_get_dtable( lua_State *L )
return vlclua_get_object( L, vlclua_get_dtable ); return vlclua_get_object( L, vlclua_get_dtable );
} }
vlc_interrupt_t *vlclua_set_interrupt( lua_State *L )
{
vlclua_dtable_t *dt = vlclua_get_dtable( L );
return vlc_interrupt_set( dt->interrupt );
}
/** Maps an OS file descriptor to a VLC Lua file descriptor */ /** Maps an OS file descriptor to a VLC Lua file descriptor */
static int vlclua_fd_map( lua_State *L, int fd ) static int vlclua_fd_map( lua_State *L, int fd )
{ {
...@@ -343,8 +349,7 @@ static int vlclua_net_poll( lua_State *L ) ...@@ -343,8 +349,7 @@ static int vlclua_net_poll( lua_State *L )
lua_pop( L, 1 ); lua_pop( L, 1 );
} }
vlclua_dtable_t *dt = vlclua_get_dtable( L ); vlc_interrupt_t *oint = vlclua_set_interrupt( L );
vlc_interrupt_t *oint = vlc_interrupt_set( dt->interrupt );
int ret = 1, val; int ret = 1, val;
do do
......
...@@ -180,6 +180,7 @@ typedef struct ...@@ -180,6 +180,7 @@ typedef struct
int vlclua_fd_init( lua_State *, vlclua_dtable_t * ); int vlclua_fd_init( lua_State *, vlclua_dtable_t * );
void vlclua_fd_interrupt( vlclua_dtable_t * ); void vlclua_fd_interrupt( vlclua_dtable_t * );
void vlclua_fd_cleanup( vlclua_dtable_t * ); void vlclua_fd_cleanup( vlclua_dtable_t * );
struct vlc_interrupt *vlclua_set_interrupt( lua_State *L );
/** /**
* Per-interface private state * Per-interface private state
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment