Commit b29e49e6 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

module_Put: releases a reference to a module

parent f44ed771
......@@ -25,7 +25,7 @@
#error You are not libvlc or one of its plugins. You cannot include this file
#endif
#if 1
#if 0
/* FIXME: scheduled for privatization */
#define MODULE_SHORTCUT_MAX 50
......@@ -107,6 +107,8 @@ VLC_EXPORT( vlc_bool_t, __module_Exists, ( vlc_object_t *, const char * ) );
/* Use only if you know what you're doing... */
#define module_FindName(a,b) __module_FindName(VLC_OBJECT(a),b)
VLC_EXPORT( module_t *, __module_FindName, ( vlc_object_t *, const char * ) );
VLC_EXPORT( void, module_Put, ( module_t *module ) );
/* Return a NULL terminated array with the names of the modules that have a
* certain capability.
......
......@@ -176,6 +176,8 @@ __intf_UserYesNo
IsUTF8
LocaleFree
mdate
__module_FindName
module_Put
__module_Exists
__module_Need
__module_Unneed
......
......@@ -709,6 +709,16 @@ module_t *__module_FindName( vlc_object_t *p_this, const char * psz_name )
return NULL;
}
/*****************************************************************************
* module_Put: release a module_t pointer from module_FindName().
*****************************************************************************/
void module_Put ( module_t *module )
{
vlc_object_release ( module );
}
/*****************************************************************************
* module_Exists: tell if a module exists.
*****************************************************************************
......@@ -719,7 +729,7 @@ vlc_bool_t __module_Exists( vlc_object_t *p_this, const char * psz_name )
module_t *p_module = __module_FindName( p_this, psz_name );
if( p_module )
{
vlc_object_release( p_module );
module_Put( p_module );
return VLC_TRUE;
}
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment