X-Git-Url: https://git.videolan.org/gitweb.cgi/vlc.git/?p=vlc.git;p=vlc.git;a=blobdiff_plain;f=src%2Fmodules%2Fmodules.c;h=274807a62e5ecda63b888ea2acb6ca6055c71356;hp=9e426c6cf7eeda5ab78eb652b98c5a40333482f9;hb=a19d0546bfc2f4205cca81182fbf6f27fb19c8ab;hpb=df50e0f4e85c05eb123b9f60a3aaed072a6aa52e diff --git a/src/modules/modules.c b/src/modules/modules.c index 9e426c6cf7..274807a62e 100644 --- a/src/modules/modules.c +++ b/src/modules/modules.c @@ -157,7 +157,7 @@ static void module_LoadMain( vlc_object_t *p_this ); /* Sub-version number * (only used to avoid breakage in dev version when cache structure changes) */ -#define CACHE_SUBVERSION_NUM 2 +#define CACHE_SUBVERSION_NUM 3 /***************************************************************************** * module_InitBank: create the module bank. @@ -1119,7 +1119,7 @@ static module_t * AllocatePlugin( vlc_object_t * p_this, char * psz_file ) /* Now that we have successfully loaded the module, we can * allocate a structure for it */ - p_module = vlc_object_create( p_this, VLC_OBJECT_MODULE ); + p_module = vlc_module_create( p_this ); if( p_module == NULL ) { msg_Err( p_this, "out of memory" ); @@ -1130,9 +1130,6 @@ static module_t * AllocatePlugin( vlc_object_t * p_this, char * psz_file ) /* We need to fill these since they may be needed by CallEntry() */ p_module->psz_filename = psz_file; p_module->handle = handle; -#ifndef HAVE_SHARED_LIBVLC - p_module->p_symbols = &p_this->p_libvlc_global->p_module_bank->symbols; -#endif p_module->b_loaded = VLC_TRUE; /* Initialize the module: fill p_module, default config */ @@ -1234,7 +1231,7 @@ static int AllocateBuiltinModule( vlc_object_t * p_this, /* Now that we have successfully loaded the module, we can * allocate a structure for it */ - p_module = vlc_object_create( p_this, VLC_OBJECT_MODULE ); + p_module = vlc_module_create( p_this ); if( p_module == NULL ) { msg_Err( p_this, "out of memory" ); @@ -1788,7 +1785,7 @@ static void CacheLoad( vlc_object_t *p_this ) if( pp_cache[i]->b_junk ) continue; - pp_cache[i]->p_module = vlc_object_create( p_this, VLC_OBJECT_MODULE ); + pp_cache[i]->p_module = vlc_module_create( p_this ); /* Load additional infos */ LOAD_STRING( pp_cache[i]->p_module->psz_object_name ); @@ -1817,10 +1814,7 @@ static void CacheLoad( vlc_object_t *p_this ) while( i_submodules-- ) { - module_t *p_module = vlc_object_create( p_this, VLC_OBJECT_MODULE); - vlc_object_attach( p_module, pp_cache[i]->p_module ); - p_module->b_submodule = VLC_TRUE; - + module_t *p_module = vlc_submodule_create( pp_cache[i]->p_module ); LOAD_STRING( p_module->psz_object_name ); LOAD_STRING( p_module->psz_shortname ); LOAD_STRING( p_module->psz_longname );