X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=include%2Fvlc_common.h;h=37a3fc4b392023ce1207c33626168ce7d02d0552;hb=3a903d5fc45aaccbe084de600c2b3b47ee9b7df9;hp=415fd0335fd5c500f547ef95c52a7414f301e06a;hpb=a04423daf678b33f451c5d24d7129d95957e4318;p=vlc diff --git a/include/vlc_common.h b/include/vlc_common.h index 415fd0335f..37a3fc4b39 100644 --- a/include/vlc_common.h +++ b/include/vlc_common.h @@ -3,7 +3,7 @@ * Collection of useful common types and macros definitions ***************************************************************************** * Copyright (C) 1998, 1999, 2000 VideoLAN - * $Id: vlc_common.h,v 1.93 2003/12/03 21:50:49 sigmunau Exp $ + * $Id: vlc_common.h,v 1.96 2003/12/06 22:45:53 jpsaman Exp $ * * Authors: Samuel Hocevar * Vincent Seguin @@ -93,6 +93,8 @@ typedef unsigned long long uint64_t; typedef signed long long int64_t; # endif + typedef uint32_t uintptr_t; + typedef int32_t intptr_t; #endif typedef uint8_t byte_t; @@ -448,13 +450,14 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */ #define TAB_APPEND( count, tab, p ) \ if( (count) > 0 ) \ { \ - (void *)(tab) = realloc( (tab), sizeof( void ** ) * ( (count) + 1 ) );\ + (*(void **)(&tab)) = \ + realloc( tab, sizeof( void ** ) * ( (count) + 1 ) ); \ } \ else \ { \ - (void *)(tab) = malloc( sizeof( void ** ) ); \ + (*(void **)(&tab)) = malloc( sizeof( void ** ) ); \ } \ - (void**)(tab)[(count)] = (void*)(p); \ + ((void**)(tab))[count] = (void*)(p); \ (count)++ #define TAB_FIND( count, tab, p, index ) \ @@ -463,7 +466,7 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */ (index) = -1; \ for( _i_ = 0; _i_ < (count); _i_++ ) \ { \ - if((void**)(tab)[_i_]==(void*)(p)) \ + if( ((void**)(tab))[_i_] == (void*)(p) ) \ { \ (index) = _i_; \ break; \ @@ -784,7 +787,8 @@ VLC_EXPORT( char *, vlc_dgettext, ( const char *package, const char *msgid ) ); #if defined( ENABLE_NLS ) && \ (defined(MODULE_NAME_IS_gnome)||defined(MODULE_NAME_IS_gnome_main)||\ - defined(MODULE_NAME_IS_gnome2)||defined(MODULE_NAME_IS_gnome2_main)) + defined(MODULE_NAME_IS_gnome2)||defined(MODULE_NAME_IS_gnome2_main)||\ + defined(MODULE_NAME_IS_pda)) /* Declare nothing: gnome.h will do it for us */ #elif defined( ENABLE_NLS ) #if defined( HAVE_INCLUDED_GETTEXT )