Commit 308259d1 authored by Casian Andrei's avatar Casian Andrei Committed by Ilkka Ollakka

Create a has_key function for a vlc dictionary

Signed-off-by: default avatarIlkka Ollakka <ileoo@videolan.org>
parent cba6de79
......@@ -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