Commit 7e9873e9 authored by Casian Andrei's avatar Casian Andrei Committed by Jean-Baptiste Kempf

Create a has_key function for a vlc dictionary

Signed-off-by: default avatarIlkka Ollakka <ileoo@videolan.org>
(cherry picked from commit 308259d1ab249c19463c88b382f705ffde1343e5)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 2f2f083a
......@@ -451,7 +451,15 @@ static inline void vlc_dictionary_clear( vlc_dictionary_t * p_dict,
p_dict->i_size = 0;
}
static inline int
vlc_dictionary_has_key( const vlc_dictionary_t * p_dict, const char * psz_key )
{
if( !p_dict->p_entries )
return 0;
int i_pos = DictHash( psz_key, p_dict->i_size );
return p_dict->p_entries[i_pos] != NULL;
}
static inline void *
vlc_dictionary_value_for_key( const vlc_dictionary_t * p_dict, const char * psz_key )
......
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