Commit d2e7edbd authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

libvlc_free: wrapper around free() when the C run-time is not known

parent b6cada70
...@@ -224,6 +224,13 @@ struct vlc_object_t; ...@@ -224,6 +224,13 @@ struct vlc_object_t;
*/ */
VLC_PUBLIC_API struct vlc_object_t *libvlc_get_vlc_instance(libvlc_instance_t *); VLC_PUBLIC_API struct vlc_object_t *libvlc_get_vlc_instance(libvlc_instance_t *);
/**
* Frees an heap allocation (char *) returned by a LibVLC API.
* If you know you're using the same underlying C run-time as the LibVLC
* implementation, then you can call ANSI C free() directly instead.
*/
VLC_PUBLIC_API void libvlc_free( void *ptr );
/** @}*/ /** @}*/
/***************************************************************************** /*****************************************************************************
......
...@@ -215,3 +215,8 @@ vlc_object_t *libvlc_get_vlc_instance( libvlc_instance_t* p_instance ) ...@@ -215,3 +215,8 @@ vlc_object_t *libvlc_get_vlc_instance( libvlc_instance_t* p_instance )
vlc_object_hold( p_instance->p_libvlc_int ) ; vlc_object_hold( p_instance->p_libvlc_int ) ;
return (vlc_object_t*) p_instance->p_libvlc_int ; return (vlc_object_t*) p_instance->p_libvlc_int ;
} }
void libvlc_free( void *ptr )
{
free( ptr );
}
...@@ -31,6 +31,7 @@ libvlc_exception_get_message ...@@ -31,6 +31,7 @@ libvlc_exception_get_message
libvlc_exception_init libvlc_exception_init
libvlc_exception_raise libvlc_exception_raise
libvlc_exception_raised libvlc_exception_raised
libvlc_free
libvlc_get_changeset libvlc_get_changeset
libvlc_get_compiler libvlc_get_compiler
libvlc_get_fullscreen libvlc_get_fullscreen
......
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