summaryrefslogtreecommitdiff
path: root/libavutil/mem.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2010-12-04 04:00:12 +0000
committerMichael Niedermayer <michaelni@gmx.at>2010-12-04 04:00:12 +0000
commitb47541c7a38de186e85f728fd54f1a9ec6b88688 (patch)
tree7ab57e145d8eb6a5f147de9bf1310c0fa0df804c /libavutil/mem.h
parent5bdbf64cf346e5558fe1920ff6cd06ae1f646a3c (diff)
Change the argument of memory allocation functions from unsigned int to size_t
with the next major bump in libavutil. Originally committed as revision 25871 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil/mem.h')
-rw-r--r--libavutil/mem.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/libavutil/mem.h b/libavutil/mem.h
index 1ec8eb8601..458d3aced1 100644
--- a/libavutil/mem.h
+++ b/libavutil/mem.h
@@ -62,6 +62,12 @@
#define av_alloc_size(n)
#endif
+#if LIBAVUTIL_VERSION_MAJOR < 51
+# define FF_INTERNAL_MEM_TYPE unsigned int
+#else
+# define FF_INTERNAL_MEM_TYPE size_t
+#endif
+
/**
* Allocate a block of size bytes with alignment suitable for all
* memory accesses (including vectors if available on the CPU).
@@ -70,7 +76,7 @@
* be allocated.
* @see av_mallocz()
*/
-void *av_malloc(unsigned int size) av_malloc_attrib av_alloc_size(1);
+void *av_malloc(FF_INTERNAL_MEM_TYPE size) av_malloc_attrib av_alloc_size(1);
/**
* Allocate or reallocate a block of memory.
@@ -84,7 +90,7 @@ void *av_malloc(unsigned int size) av_malloc_attrib av_alloc_size(1);
* cannot be reallocated or the function is used to free the memory block.
* @see av_fast_realloc()
*/
-void *av_realloc(void *ptr, unsigned int size) av_alloc_size(2);
+void *av_realloc(void *ptr, FF_INTERNAL_MEM_TYPE size) av_alloc_size(2);
/**
* Free a memory block which has been allocated with av_malloc(z)() or
@@ -104,7 +110,7 @@ void av_free(void *ptr);
* @return Pointer to the allocated block, NULL if it cannot be allocated.
* @see av_malloc()
*/
-void *av_mallocz(unsigned int size) av_malloc_attrib av_alloc_size(1);
+void *av_mallocz(FF_INTERNAL_MEM_TYPE size) av_malloc_attrib av_alloc_size(1);
/**
* Duplicate the string s.