include: Add WINE_ALLOC_SIZE attribute to heap_calloc().
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f214d0c44e
commit
1c4131ba78
|
@ -46,7 +46,7 @@ static inline void heap_free(void *mem)
|
||||||
HeapFree(GetProcessHeap(), 0, mem);
|
HeapFree(GetProcessHeap(), 0, mem);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void *heap_calloc(SIZE_T count, SIZE_T size)
|
static inline void * __WINE_ALLOC_SIZE(1,2) heap_calloc(SIZE_T count, SIZE_T size)
|
||||||
{
|
{
|
||||||
SIZE_T len = count * size;
|
SIZE_T len = count * size;
|
||||||
|
|
||||||
|
|
|
@ -199,9 +199,9 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)))
|
#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)))
|
||||||
#define __WINE_ALLOC_SIZE(x) __attribute__((__alloc_size__(x)))
|
#define __WINE_ALLOC_SIZE(...) __attribute__((__alloc_size__(__VA_ARGS__)))
|
||||||
#else
|
#else
|
||||||
#define __WINE_ALLOC_SIZE(x)
|
#define __WINE_ALLOC_SIZE(...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Anonymous union/struct handling */
|
/* Anonymous union/struct handling */
|
||||||
|
|
Loading…
Reference in New Issue