lua: intf: remove forward declaration

This commit is contained in:
Alexandre Janniaux 2023-02-19 12:01:14 +01:00 committed by Felix Paul Kühne
parent 1aab2c6c62
commit 7f64311c46
1 changed files with 17 additions and 22 deletions

View File

@ -38,11 +38,6 @@
#include "vlc.h"
#include "libs.h"
/*****************************************************************************
* Prototypes
*****************************************************************************/
static void *Run( void * );
static const char * const ppsz_intf_options[] = { "intf", "config", NULL };
/*****************************************************************************
@ -183,6 +178,23 @@ static char *StripPasswords( const char *psz_config )
static const luaL_Reg p_reg[] = { { NULL, NULL } };
static void *Run(void *data)
{
vlc_thread_set_name("vlc-lua-intf");
intf_thread_t *p_intf = data;
intf_sys_t *p_sys = p_intf->p_sys;
lua_State *L = p_sys->L;
if (vlclua_dofile(VLC_OBJECT(p_intf), L, p_sys->psz_filename))
{
msg_Err(p_intf, "Error loading script %s: %s", p_sys->psz_filename,
lua_tostring(L, lua_gettop(L)));
lua_pop(L, 1);
}
return NULL;
}
static int Start_LuaIntf( vlc_object_t *p_this, const char *name )
{
if( lua_Disabled( p_this ) )
@ -400,23 +412,6 @@ void Close_LuaIntf( vlc_object_t *p_this )
vlc_LogDestroy( p_intf->obj.logger );
}
static void *Run( void *data )
{
vlc_thread_set_name("vlc-lua-intf");
intf_thread_t *p_intf = data;
intf_sys_t *p_sys = p_intf->p_sys;
lua_State *L = p_sys->L;
if( vlclua_dofile( VLC_OBJECT(p_intf), L, p_sys->psz_filename ) )
{
msg_Err( p_intf, "Error loading script %s: %s", p_sys->psz_filename,
lua_tostring( L, lua_gettop( L ) ) );
lua_pop( L, 1 );
}
return NULL;
}
int Open_LuaIntf( vlc_object_t *p_this )
{
return Start_LuaIntf( p_this, NULL );