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

Use the new registration mechanism for memcpy/memset

parent b04c6c66
......@@ -883,15 +883,13 @@ VLC_EXPORT( int, __vlc_execve, ( vlc_object_t *p_object, int i_argc, char *const
#define CPU_CAPABILITY_ALTIVEC (1<<16)
#define CPU_CAPABILITY_FPU (1<<31)
VLC_EXPORT( unsigned, vlc_CPU, ( void ) );
VLC_EXPORT( void *, vlc_memcpy, ( void *, const void *, size_t ) );
VLC_EXPORT( void *, vlc_memset, ( void *, int, size_t ) );
typedef void *(*vlc_memcpy_t) (void *tgt, const void *src, size_t n);
typedef void *(*vlc_memset_t) (void *tgt, int c, size_t n);
VLC_EXPORT( void, vlc_fastmem_register, (vlc_memcpy_t cpy, vlc_memset_t set) );
VLC_EXPORT( void *, vlc_memcpy, ( vlc_object_t *, void *, const void *, size_t ) );
VLC_EXPORT( void *, vlc_memset, ( vlc_object_t *, void *, int, size_t ) );
VLC_EXPORT( void *, vlc_memcpy, ( void *, const void *, size_t ) );
VLC_EXPORT( void *, vlc_memset, ( void *, int, size_t ) );
/*****************************************************************************
* I18n stuff
......
......@@ -64,12 +64,8 @@
*****************************************************************************/
static int Activate ( vlc_object_t *p_this )
{
#ifdef MODULE_NAME_IS_memcpy
p_this->p_libvlc->pf_memcpy = memcpy;
p_this->p_libvlc->pf_memset = memset;
#else
p_this->p_libvlc->pf_memcpy = fast_memcpy;
p_this->p_libvlc->pf_memset = NULL;
#ifndef MODULE_NAME_IS_memcpy
vlc_fastmem_register( fast_memcpy, NULL );
#endif
return VLC_SUCCESS;
......
......@@ -47,7 +47,7 @@ static void * fast_memcpy ( void * to, const void * from, size_t len );
*****************************************************************************/
static int Activate ( vlc_object_t *p_this )
{
p_this->p_libvlc->pf_memcpy = fast_memcpy;
vlc_fastmem_register( fast_memcpy, NULL );
return VLC_SUCCESS;
}
......
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