vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Tue Feb 19 20:40:48 2019 +0200| [bc17cd8e6724c09a13f60c6b6402544da05addeb] | committer: Rémi Denis-Courmont
libvlc: remove the private logger The public logger can be used. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bc17cd8e6724c09a13f60c6b6402544da05addeb --- src/libvlc.c | 2 +- src/libvlc.h | 1 - src/misc/messages.c | 9 +++------ 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/libvlc.c b/src/libvlc.c index f183d3e978..b8eb2bf9e8 100644 --- a/src/libvlc.c +++ b/src/libvlc.c @@ -479,7 +479,7 @@ void libvlc_InternalCleanup( libvlc_int_t *p_libvlc ) if( !var_InheritBool( p_libvlc, "ignore-config" ) ) config_AutoSaveConfigFile( VLC_OBJECT(p_libvlc) ); - vlc_LogDestroy(priv->logger); + vlc_LogDestroy(p_libvlc->obj.logger); /* Free module bank. It is refcounted, so we call this each time */ module_EndBank (true); #if defined(_WIN32) || defined(__OS2__) diff --git a/src/libvlc.h b/src/libvlc.h index c4fffb920a..2f676e6188 100644 --- a/src/libvlc.h +++ b/src/libvlc.h @@ -194,7 +194,6 @@ typedef struct libvlc_priv_t libvlc_int_t public_data; /* Singleton objects */ - vlc_logger_t *logger; vlm_t *p_vlm; ///< the VLM singleton (or NULL) vlc_dialog_provider *p_dialog_provider; ///< dialog provider vlc_keystore *p_memory_keystore; ///< memory keystore diff --git a/src/misc/messages.c b/src/misc/messages.c index 340e13bba2..84b22478f9 100644 --- a/src/misc/messages.c +++ b/src/misc/messages.c @@ -338,11 +338,10 @@ static const struct vlc_logger_operations switch_ops = { vlc_LogSwitchClose, }; -static void vlc_LogSwitch(libvlc_int_t *vlc, +static void vlc_LogSwitch(vlc_logger_t *logger, const struct vlc_logger_operations *ops, void *opaque) { - struct vlc_logger *logger = libvlc_priv(vlc)->logger; struct vlc_logger_switch *logswitch = logger->sys; struct vlc_logger old_logger; @@ -436,7 +435,7 @@ void vlc_LogInit(libvlc_int_t *vlc) vlc_object_release(VLC_OBJECT(module)); } - vlc_LogSwitch(vlc, ops, module); + vlc_LogSwitch(vlc->obj.logger, ops, module); } /** @@ -459,8 +458,6 @@ int vlc_LogPreinit(libvlc_int_t *vlc) free(logger); return -1; } - - libvlc_priv(vlc)->logger = logger; vlc->obj.logger = logger; const struct vlc_logger_operations *ops; @@ -479,7 +476,7 @@ int vlc_LogPreinit(libvlc_int_t *vlc) void vlc_LogSet(libvlc_int_t *vlc, const struct vlc_logger_operations *ops, void *opaque) { - vlc_LogSwitch(vlc, ops, opaque); + vlc_LogSwitch(vlc->obj.logger, ops, opaque); /* Announce who we are */ msg_Dbg (vlc, "VLC media player - %s", VERSION_MESSAGE); _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
