Commit 33c764fa authored by Laurent Aimar's avatar Laurent Aimar

* vlc_common: changed TAB_APPEND. I have to do this because the old way

 seems to make bogus code (but I'm not sure).
parent 9bbd9158
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions * Collection of useful common types and macros definitions
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN * Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vlc_common.h,v 1.103 2004/01/20 17:44:30 sam Exp $ * $Id: vlc_common.h,v 1.104 2004/01/24 20:40:46 fenrir Exp $
* *
* Authors: Samuel Hocevar <sam@via.ecp.fr> * Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr> * Vincent Seguin <seguin@via.ecp.fr>
...@@ -453,12 +453,11 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */ ...@@ -453,12 +453,11 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */
#define TAB_APPEND( count, tab, p ) \ #define TAB_APPEND( count, tab, p ) \
if( (count) > 0 ) \ if( (count) > 0 ) \
{ \ { \
(*(void **)(&tab)) = \ (void *)(tab) = realloc( tab, sizeof( void ** ) * ( (count) + 1 ) ); \
realloc( tab, sizeof( void ** ) * ( (count) + 1 ) ); \
} \ } \
else \ else \
{ \ { \
(*(void **)(&tab)) = malloc( sizeof( void ** ) ); \ (void *)(tab) = malloc( sizeof( void ** ) ); \
} \ } \
((void**)(tab))[count] = (void*)(p); \ ((void**)(tab))[count] = (void*)(p); \
(count)++ (count)++
......
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