Revision 490a022d libavutil/mem.h

View differences:

libavutil/mem.h
62 62
    #define av_alloc_size(n)
63 63
#endif
64 64

  
65
#if LIBAVUTIL_VERSION_MAJOR < 51
66
#   define FF_INTERNAL_MEM_TYPE unsigned int
67
#   define FF_INTERNAL_MEM_TYPE_MAX_VALUE UINT_MAX
68
#else
69
#   define FF_INTERNAL_MEM_TYPE size_t
70
#   define FF_INTERNAL_MEM_TYPE_MAX_VALUE SIZE_MAX
71
#endif
72

  
73 65
/**
74 66
 * Allocate a block of size bytes with alignment suitable for all
75 67
 * memory accesses (including vectors if available on the CPU).
......
78 70
 * be allocated.
79 71
 * @see av_mallocz()
80 72
 */
81
void *av_malloc(FF_INTERNAL_MEM_TYPE size) av_malloc_attrib av_alloc_size(1);
73
void *av_malloc(size_t size) av_malloc_attrib av_alloc_size(1);
82 74

  
83 75
/**
84 76
 * Allocate or reallocate a block of memory.
......
92 84
 * cannot be reallocated or the function is used to free the memory block.
93 85
 * @see av_fast_realloc()
94 86
 */
95
void *av_realloc(void *ptr, FF_INTERNAL_MEM_TYPE size) av_alloc_size(2);
87
void *av_realloc(void *ptr, size_t size) av_alloc_size(2);
96 88

  
97 89
/**
98 90
 * Free a memory block which has been allocated with av_malloc(z)() or
......
112 104
 * @return Pointer to the allocated block, NULL if it cannot be allocated.
113 105
 * @see av_malloc()
114 106
 */
115
void *av_mallocz(FF_INTERNAL_MEM_TYPE size) av_malloc_attrib av_alloc_size(1);
107
void *av_mallocz(size_t size) av_malloc_attrib av_alloc_size(1);
116 108

  
117 109
/**
118 110
 * Duplicate the string s.

Also available in: Unified diff