X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fmisc%2Flua%2Flibs%2Fmisc.c;h=37fdb72c95ae9143c47351260b5043fae34261fa;hb=5281440cca25ed01d1844f5a8eeda855ea9ef4c5;hp=8a21cceeebc5d2b465b56a7d9acde6a8187209ad;hpb=b935abee4d16231e34ab6a2b092fcc1e757483c5;p=vlc diff --git a/modules/misc/lua/libs/misc.c b/modules/misc/lua/libs/misc.c index 8a21cceeeb..37fdb72c95 100644 --- a/modules/misc/lua/libs/misc.c +++ b/modules/misc/lua/libs/misc.c @@ -105,7 +105,7 @@ static int vlclua_quit( lua_State *L ) vlc_object_t *p_this = vlclua_get_this( L ); /* The rc.c code also stops the playlist ... not sure if this is needed * though. */ - vlc_object_kill( p_this->p_libvlc ); + libvlc_Quit( p_this->p_libvlc ); return 0; } @@ -120,19 +120,23 @@ static int vlclua_datadir( lua_State *L ) static int vlclua_userdatadir( lua_State *L ) { - lua_pushstring( L, config_GetUserDataDir() ); + char *dir = config_GetUserDir( VLC_DATA_DIR ); + lua_pushstring( L, dir ); + free( dir ); return 1; } static int vlclua_homedir( lua_State *L ) { - lua_pushstring( L, config_GetHomeDir() ); + char *home = config_GetUserDir( VLC_HOME_DIR ); + lua_pushstring( L, home ); + free( home ); return 1; } static int vlclua_configdir( lua_State *L ) { - char *dir = config_GetUserConfDir(); + char *dir = config_GetUserDir( VLC_CONFIG_DIR ); lua_pushstring( L, dir ); free( dir ); return 1; @@ -140,7 +144,7 @@ static int vlclua_configdir( lua_State *L ) static int vlclua_cachedir( lua_State *L ) { - char *dir = config_GetCacheDir(); + char *dir = config_GetUserDir( VLC_CACHE_DIR ); lua_pushstring( L, dir ); free( dir ); return 1; @@ -197,7 +201,7 @@ static int vlclua_mwait( lua_State *L ) static int vlclua_intf_should_die( lua_State *L ) { intf_thread_t *p_intf = (intf_thread_t*)vlclua_get_this( L ); - lua_pushboolean( L, !vlc_object_alive( p_intf ) ); + lua_pushboolean( L, p_intf->p_sys->exiting ); return 1; }