[vlc-devel] [PATCH 2/2] zsh completion: use public module interface

Hugo Beauzée-Luyssen hugo at beauzee.fr
Wed Sep 27 10:30:45 CEST 2017


On Wed, Sep 27, 2017, at 12:23 AM, Sebastian Ramacher wrote:
> Signed-off-by: Sebastian Ramacher <sramacher at debian.org>
> ---
>  extras/analyser/zsh.cpp | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/extras/analyser/zsh.cpp b/extras/analyser/zsh.cpp
> index f66c026168..e03ebca4ea 100644
> --- a/extras/analyser/zsh.cpp
> +++ b/extras/analyser/zsh.cpp
> @@ -35,7 +35,6 @@
>  #include <vlc_common.h>
>  #include <vlc_modules.h>
>  #include <vlc_plugin.h>
> -#include "../src/modules/modules.h" /* evil hack */
>  
>  typedef std::pair<std::string, std::string> mpair;
>  typedef std::multimap<std::string, std::string> mumap;
> @@ -202,12 +201,14 @@ static void ParseOption(const module_config_t
> *item)
>  
>  static void PrintModule(const module_t *mod)
>  {
> -    const char *name = mod->pp_shortcuts[0];
> -    if (!strcmp(name, "main"))
> +    if (module_is_main(mod))
>          return;
>  
> -    if (mod->psz_capability)
> -        capabilities.insert(mpair(mod->psz_capability, name));
> +    const char *name = module_get_object(mod);
> +    const char *cap = module_get_capability(mod);
> +
> +    if (strcmp(cap, "none"))
> +        capabilities.insert(mpair(cap, name));
>  
>      unsigned int cfg_size = 0;
>      module_config_t *cfg_list = module_config_get(mod, &cfg_size);
> -- 
> 2.14.2
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel

LGTM

-- 
  Hugo Beauzée-Luyssen
  hugo at beauzee.fr


More information about the vlc-devel mailing list