Commit 666ca3c1 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

vlc_arrays.h: vlc_array_new, vlc_array_destroy.

parent 662a0037
......@@ -290,6 +290,12 @@ typedef struct vlc_array_t
void ** pp_elems;
} vlc_array_t;
static inline vlc_array_t * vlc_array_new( void )
{
return calloc( 1, sizeof(vlc_array_t) );
}
static inline void vlc_array_init( vlc_array_t * p_array )
{
memset( p_array, 0, sizeof(vlc_array_t) );
......@@ -301,6 +307,13 @@ static inline void vlc_array_clear( vlc_array_t * p_array )
memset( p_array, 0, sizeof(vlc_array_t) );
}
static inline void vlc_array_destroy( vlc_array_t * p_array )
{
vlc_array_clear( p_array );
free( p_array );
}
/* Read */
static inline int
vlc_array_count( vlc_array_t * p_array )
......
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