[vlc-commits] cache: reorder submodules and configuration
Rémi Denis-Courmont
git at videolan.org
Wed Oct 26 21:56:29 CEST 2016
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Oct 26 22:56:03 2016 +0300| [376682fe2f55943f48e8fb38a3b4c6b9de8f921d] | committer: Rémi Denis-Courmont
cache: reorder submodules and configuration
This will be useful for later changes.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=376682fe2f55943f48e8fb38a3b4c6b9de8f921d
---
src/modules/cache.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/modules/cache.c b/src/modules/cache.c
index 27333c1..95473df 100644
--- a/src/modules/cache.c
+++ b/src/modules/cache.c
@@ -57,7 +57,7 @@
#ifdef HAVE_DYNAMIC_PLUGINS
/* Sub-version number
* (only used to avoid breakage in dev version when cache structure changes) */
-#define CACHE_SUBVERSION_NUM 26
+#define CACHE_SUBVERSION_NUM 27
/* Cache filename */
#define CACHE_NAME "plugins.dat"
@@ -313,10 +313,6 @@ static module_t *vlc_cache_load_module(vlc_plugin_t *plugin, block_t *file)
LOAD_IMMEDIATE(module->i_score);
LOAD_IMMEDIATE(module->b_unloadable);
- /* Config stuff */
- if (CacheLoadModuleConfig (module, file) != VLC_SUCCESS)
- goto error;
-
LOAD_STRING(module->domain);
if (module->domain != NULL)
vlc_bindtextdomain (module->domain);
@@ -347,6 +343,10 @@ static module_t *vlc_cache_load_module(vlc_plugin_t *plugin, block_t *file)
LOAD_IMMEDIATE(submodule->i_score);
}
+ /* Config stuff */
+ if (CacheLoadModuleConfig(module, file) != VLC_SUCCESS)
+ goto error;
+
return module;
error:
vlc_module_destroy(module);
@@ -650,10 +650,6 @@ static int CacheSaveBank(FILE *file, vlc_plugin_t *const *cache, size_t n)
SAVE_IMMEDIATE(module->i_score);
SAVE_IMMEDIATE(module->b_unloadable);
- /* Config stuff */
- if (CacheSaveModuleConfig (file, module))
- goto error;
-
SAVE_STRING(module->domain);
i_submodule = module->submodule_count;
@@ -661,6 +657,10 @@ static int CacheSaveBank(FILE *file, vlc_plugin_t *const *cache, size_t n)
if (CacheSaveSubmodule (file, module->submodule))
goto error;
+ /* Config stuff */
+ if (CacheSaveModuleConfig (file, module))
+ goto error;
+
/* Save common info */
SAVE_STRING(cache[i]->path);
SAVE_IMMEDIATE(cache[i]->mtime);
More information about the vlc-commits
mailing list