[vlc-devel] [PATCH] messages: rename vlc_LogSwitch methods

Rémi Denis-Courmont remi at remlab.net
Wed Dec 23 11:24:55 UTC 2020


Le keskiviikkona 23. joulukuuta 2020, 13.06.44 EET Alexandre Janniaux a écrit 
:
> vlc_vaLogSwitch is confusing given that vlc_LogSwitch also exists in the
> public API. Using usual prefix notation avoid the confusion.

I have to disagree. This is consistent with the existing (public and private) 
logging function names and I don't see what confusing here. And given that the 
functions are static, this looks totally gratuitious.

> ---
>  src/misc/messages.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/src/misc/messages.c b/src/misc/messages.c
> index b7dc1d8f50..0b4f2f9efb 100644
> --- a/src/misc/messages.c
> +++ b/src/misc/messages.c
> @@ -304,7 +304,7 @@ struct vlc_logger_switch {
>      vlc_rwlock_t lock;
>  };
> 
> -static void vlc_vaLogSwitch(void *d, int type, const vlc_log_t *item,
> +static void vlc_logswitch_vaLog(void *d, int type, const vlc_log_t *item,
>                              const char *format, va_list ap)
>  {
>      struct vlc_logger *logger = d;
> @@ -318,7 +318,7 @@ static void vlc_vaLogSwitch(void *d, int type, const
> vlc_log_t *item, vlc_rwlock_unlock(&logswitch->lock);
>  }
> 
> -static void vlc_LogSwitchClose(void *d)
> +static void vlc_logswitch_Close(void *d)
>  {
>      struct vlc_logger *logger = d;
>      struct vlc_logger_switch *logswitch =
> @@ -333,8 +333,8 @@ static void vlc_LogSwitchClose(void *d)
>  }
> 
>  static const struct vlc_logger_operations switch_ops = {
> -    vlc_vaLogSwitch,
> -    vlc_LogSwitchClose,
> +    vlc_logswitch_vaLog,
> +    vlc_logswitch_Close,
>  };
> 
>  static void vlc_LogSwitch(vlc_logger_t *logger, vlc_logger_t *new_logger)


-- 
Реми Дёни-Курмон
http://www.remlab.net/





More information about the vlc-devel mailing list