#if AV_GCC_VERSION_AT_LEAST(4,3)
#define av_alloc_size(...) attribute((alloc_size(__VA_ARGS__)))
#else
#define av_alloc_size(...)
#endif
/**
Allocate a memory block for an array with av_mallocz(). *
The allocated memory will have size size * nmemb bytes. *
@param nmemb Number of elements
@param size Size of the single element
@return Pointer to the allocated block, or NULL if the block cannot
be allocated *
@see av_mallocz()
@see av_malloc_array() */ av_alloc_size(1, 2) static inline void *av_mallocz_array(size_t nmemb, size_t size) { if (!size || nmemb >= INT_MAX / size) return NULL; return av_mallo
av_alloc_size(1, 2) static inline void *av_mallocz_array(size_t nmemb, size_t size)
{
if (!size || nmemb >= INT_MAX / size)
return NULL;
return av_mallocz(nmemb * size);
}
allocz(nmemb * size); }
帮我解释一下,C语言的方法嵌套的问题。我是C语言新手,今天看代码突然看到此方法,我有点闹不机密了。有可我描述的有问题,但是这个方法很奇怪,方法声明前头还有方法。到底这个函数有没有返回值?