X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=include%2Fvlc_common.h;h=1e7bbf16b622677f1cde6b7d65eede018a8b1594;hb=5dbc70c99be39d53beb4d4548fd5767eddd17cf1;hp=451a008926ba35707d652a98a9ddf57a32da7948;hpb=e21ba63b8a25191bb68d2a6d075763a3d65371ff;p=vlc diff --git a/include/vlc_common.h b/include/vlc_common.h index 451a008926..1e7bbf16b6 100644 --- a/include/vlc_common.h +++ b/include/vlc_common.h @@ -550,32 +550,10 @@ struct gc_object_t VLC_GC_MEMBERS }; -static inline void __vlc_gc_incref( gc_object_t * p_gc ) -{ - p_gc->i_gc_refcount ++; -}; - -static inline void __vlc_gc_decref( gc_object_t *p_gc ) -{ - if( !p_gc ) return; - - p_gc->i_gc_refcount -- ; - - if( p_gc->i_gc_refcount == 0 ) - { - p_gc->pf_destructor( p_gc ); - /* Do not use the p_gc pointer from now on ! */ - } -} - -static inline void -__vlc_gc_init( gc_object_t * p_gc, void (*pf_destructor)( gc_object_t * ), - void * arg) -{ - p_gc->i_gc_refcount = 1; - p_gc->pf_destructor = pf_destructor; - p_gc->p_destructor_arg = arg; -} +VLC_EXPORT(void, __vlc_gc_incref, ( gc_object_t * p_gc )); +VLC_EXPORT(void, __vlc_gc_decref, ( gc_object_t * p_gc )); +VLC_EXPORT(void, __vlc_gc_init, ( gc_object_t * p_gc, + void (*pf_destructor)( gc_object_t * ), void * arg)); #define vlc_gc_incref( a ) __vlc_gc_incref( (gc_object_t *)a ) #define vlc_gc_decref( a ) __vlc_gc_decref( (gc_object_t *)a ) @@ -643,9 +621,7 @@ VLC_EXPORT( char const *, vlc_error, ( int ) ); #include /* MSB (big endian)/LSB (little endian) conversions - network order is always - * MSB, and should be used for both network communications and files. Note that - * byte orders other than little and big endians are not supported, but only - * the VAX seems to have such exotic properties. */ + * MSB, and should be used for both network communications and files. */ static inline uint16_t U16_AT( const void * _p ) { const uint8_t * p = (const uint8_t *)_p;