diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-09-15 00:32:37 +0300 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-09-20 02:04:09 +0300 |
commit | 8d5de914d31ca95ab36e6b66177be435e5cebb3d (patch) | |
tree | ad342bdb68e6f46ea154d3075ca52726e2e644d9 /libavutil/mem.h | |
parent | 1ea365082318f06cd42a8b37dd0c7724b599c821 (diff) |
avutil/mem: Deprecate av_mallocz_array()
It does the same as av_calloc(), so one of them should be removed.
Given that av_calloc() has the shorter name, it is retained.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavutil/mem.h')
-rw-r--r-- | libavutil/mem.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libavutil/mem.h b/libavutil/mem.h index c7f8867a13..b9fe80738c 100644 --- a/libavutil/mem.h +++ b/libavutil/mem.h @@ -237,14 +237,15 @@ av_alloc_size(1, 2) void *av_malloc_array(size_t nmemb, size_t size); * @see av_mallocz() * @see av_malloc_array() */ -av_alloc_size(1, 2) void *av_mallocz_array(size_t nmemb, size_t size); +void *av_calloc(size_t nmemb, size_t size) av_malloc_attrib av_alloc_size(1, 2); +#if FF_API_AV_MALLOCZ_ARRAY /** - * Equivalent of av_mallocz_array(). - * - * Created for symmetry with the calloc() C function. + * @deprecated use av_calloc() */ -void *av_calloc(size_t nmemb, size_t size) av_malloc_attrib; +attribute_deprecated +void *av_mallocz_array(size_t nmemb, size_t size) av_malloc_attrib av_alloc_size(1, 2); +#endif /** * Allocate, reallocate, or free a block of memory. |