[vlc-commits] modules: remove module_find_by_shortcut

Thomas Guillem git at videolan.org
Fri Feb 12 15:09:40 CET 2016


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Feb 12 15:08:38 2016 +0100| [16a04913290fd2729b74e8d824c2159820dc1232] | committer: Thomas Guillem

modules: remove module_find_by_shortcut

It's now unused.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=16a04913290fd2729b74e8d824c2159820dc1232
---

 src/libvlc.h          |    5 -----
 src/modules/modules.c |   29 -----------------------------
 2 files changed, 34 deletions(-)

diff --git a/src/libvlc.h b/src/libvlc.h
index d198581..fc57c2a 100644
--- a/src/libvlc.h
+++ b/src/libvlc.h
@@ -124,11 +124,6 @@ void vlc_object_set_destructor (vlc_object_t *, vlc_destructor_t);
 #define vlc_object_set_destructor(a,b) \
         vlc_object_set_destructor (VLC_OBJECT(a), b)
 
-/*
- * To be cleaned-up module stuff:
- */
-module_t *module_find_by_shortcut (const char *psz_shortcut);
-
 #define ZOOM_SECTION N_("Zoom")
 #define ZOOM_QUARTER_KEY_TEXT N_("1:4 Quarter")
 #define ZOOM_HALF_KEY_TEXT N_("1:2 Half")
diff --git a/src/modules/modules.c b/src/modules/modules.c
index 2fa9928..6dd2678 100644
--- a/src/modules/modules.c
+++ b/src/modules/modules.c
@@ -414,35 +414,6 @@ bool module_exists (const char * psz_name)
 }
 
 /**
- * Get a pointer to a module_t that matches a shortcut.
- * This is a temporary hack for SD. Do not re-use (generally multiple modules
- * can have the same shortcut, so this is *broken* - use module_need()!).
- *
- * \param psz_shortcut shortcut of the module
- * \param psz_cap capability of the module
- * \return a pointer to the module or NULL in case of a failure
- */
-module_t *module_find_by_shortcut (const char *psz_shortcut)
-{
-    size_t count;
-    module_t **list = module_list_get (&count);
-
-    for (size_t i = 0; i < count; i++)
-    {
-        module_t *module = list[count];
-
-        for (size_t j = 0; j < module->i_shortcuts; j++)
-            if (!strcmp (module->pp_shortcuts[j], psz_shortcut))
-            {
-                module_list_free (list);
-                return module;
-            }
-    }
-    module_list_free (list);
-    return NULL;
-}
-
-/**
  * Get the configuration of a module
  *
  * \param module the module



More information about the vlc-commits mailing list