diff cutils.c @ 4375:ecc817a37849 libavformat

Do not misuse unsigned long to store pointers.
author ramiro
date Wed, 04 Feb 2009 05:56:39 +0000
parents 4d73d137f64e
children 28ca2d77f997
line wrap: on
line diff
--- a/cutils.c	Wed Feb 04 04:50:47 2009 +0000
+++ b/cutils.c	Wed Feb 04 05:56:39 2009 +0000
@@ -21,10 +21,10 @@
 #include "avformat.h"
 
 /* add one element to a dynamic array */
-void ff_dynarray_add(unsigned long **tab_ptr, int *nb_ptr, unsigned long elem)
+void ff_dynarray_add(intptr_t **tab_ptr, int *nb_ptr, intptr_t elem)
 {
     int nb, nb_alloc;
-    unsigned long *tab;
+    intptr_t *tab;
 
     nb = *nb_ptr;
     tab = *tab_ptr;
@@ -33,7 +33,7 @@
             nb_alloc = 1;
         else
             nb_alloc = nb * 2;
-        tab = av_realloc(tab, nb_alloc * sizeof(unsigned long));
+        tab = av_realloc(tab, nb_alloc * sizeof(intptr_t));
         *tab_ptr = tab;
     }
     tab[nb++] = elem;