From 7f64311c46491c01a5255d5d7af4af376c45ed8e Mon Sep 17 00:00:00 2001 From: Alexandre Janniaux Date: Sun, 19 Feb 2023 12:01:14 +0100 Subject: [PATCH] lua: intf: remove forward declaration --- modules/lua/intf.c | 39 +++++++++++++++++---------------------- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/modules/lua/intf.c b/modules/lua/intf.c index 35412d5afb..fd9019c477 100644 --- a/modules/lua/intf.c +++ b/modules/lua/intf.c @@ -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 );