Changeset e29b2a0e671308993deab46394f6de15f10033e5

Show
Ignore:
Timestamp:
05/03/08 16:17:30 (3 months ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1209824250 +0300
git-parent:

[b04c6c66f43e941f33469519f1ff7d15faeeb929]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1209818526 +0300
Message:

Use the new registration mechanism for memcpy/memset

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • include/vlc_common.h

    rb04c6c6 re29b2a0  
    884884#define CPU_CAPABILITY_FPU     (1<<31) 
    885885VLC_EXPORT( unsigned, vlc_CPU, ( void ) ); 
     886 
     887typedef void *(*vlc_memcpy_t) (void *tgt, const void *src, size_t n); 
     888typedef void *(*vlc_memset_t) (void *tgt, int c, size_t n); 
     889 
     890VLC_EXPORT( void, vlc_fastmem_register, (vlc_memcpy_t cpy, vlc_memset_t set) ); 
    886891VLC_EXPORT( void *, vlc_memcpy, ( void *, const void *, size_t ) ); 
    887892VLC_EXPORT( void *, vlc_memset, ( void *, int, size_t ) ); 
    888  
    889 typedef void *(*vlc_memcpy_t) (void *tgt, const void *src, size_t n); 
    890 typedef void *(*vlc_memset_t) (void *tgt, int c, size_t n); 
    891  
    892 VLC_EXPORT( void, vlc_fastmem_register, (vlc_memcpy_t cpy, vlc_memset_t set) ); 
    893 VLC_EXPORT( void *, vlc_memcpy, ( vlc_object_t *, void *, const void *, size_t ) ); 
    894 VLC_EXPORT( void *, vlc_memset, ( vlc_object_t *, void *, int, size_t ) ); 
    895893 
    896894/***************************************************************************** 
  • modules/misc/memcpy/memcpy.c

    r99fab90 re29b2a0  
    6565static int Activate ( vlc_object_t *p_this ) 
    6666{ 
    67 #ifdef MODULE_NAME_IS_memcpy 
    68     p_this->p_libvlc->pf_memcpy = memcpy; 
    69     p_this->p_libvlc->pf_memset = memset; 
    70 #else 
    71     p_this->p_libvlc->pf_memcpy = fast_memcpy; 
    72     p_this->p_libvlc->pf_memset = NULL; 
     67#ifndef MODULE_NAME_IS_memcpy 
     68    vlc_fastmem_register( fast_memcpy, NULL ); 
    7369#endif 
    7470 
  • modules/misc/memcpy/memcpyaltivec.c

    r99fab90 re29b2a0  
    4848static int Activate ( vlc_object_t *p_this ) 
    4949{ 
    50     p_this->p_libvlc->pf_memcpy = fast_memcpy
     50    vlc_fastmem_register( fast_memcpy, NULL )
    5151    return VLC_SUCCESS; 
    5252}