Commit 5a1cb5c1 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

lua: always use vlclua_dofile

Ref #13752

(cherry picked from commit bf7ad95b7810e25f2c483fefda3e15f6239df648)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent c64e0797
......@@ -163,7 +163,7 @@ static int probe_luascript( vlc_object_t *p_this, const char * psz_filename,
}
/* Load and run the script(s) */
if( luaL_dofile( L, psz_filename ) )
if( vlclua_dofile( VLC_OBJECT(p_demux), L, psz_filename ) )
{
msg_Warn( p_demux, "Error loading script %s: %s", psz_filename,
lua_tostring( L, lua_gettop( L ) ) );
......
......@@ -402,7 +402,7 @@ static void *Run( void *data )
intf_sys_t *p_sys = p_intf->p_sys;
lua_State *L = p_sys->L;
if( luaL_dofile( L, p_sys->psz_filename ) )
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 ) ) );
......
......@@ -89,7 +89,7 @@ static int run( vlc_object_t *p_this, const char * psz_filename,
lua_setglobal( L, luafunction );
/* Load and run the script(s) */
if( luaL_dofile( L, psz_filename ) )
if( vlclua_dofile( p_this, L, psz_filename ) )
{
msg_Warn( p_this, "Error loading script %s: %s", psz_filename,
lua_tostring( L, lua_gettop( L ) ) );
......
......@@ -124,7 +124,7 @@ int Open_LuaSD( vlc_object_t *p_this )
p_sys->psz_filename );
goto error;
}
if( luaL_dofile( L, p_sys->psz_filename ) )
if( vlclua_dofile( VLC_OBJECT(p_sd), L, p_sys->psz_filename ) )
{
msg_Err( p_sd, "Error loading script %s: %s", p_sys->psz_filename,
lua_tostring( L, lua_gettop( L ) ) );
......@@ -317,7 +317,7 @@ static int FillDescriptor( services_discovery_t *p_sd,
/* Create a new lua thread */
lua_State *L = luaL_newstate();
if( luaL_dofile( L, p_sys->psz_filename ) )
if( vlclua_dofile( VLC_OBJECT(p_sd), L, p_sys->psz_filename ) )
{
msg_Err( p_sd, "Error loading script %s: %s", p_sys->psz_filename,
lua_tostring( L, -1 ) );
......
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