[PATCH] annotate with allocation size attribute
Alexandre Julliard
julliard at winehq.org
Thu Sep 4 04:19:14 CDT 2008
Marcus Meissner <marcus at jet.franken.de> writes:
> --- a/include/windef.h
> +++ b/include/windef.h
> @@ -49,6 +49,12 @@ extern "C" {
> #define _WIN64
> #endif
>
> +#if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
> +#define ALLOC_SIZE(x) __attribute__((__alloc_size__(x)))
> +#else
> +#define ALLOC_SIZE(x)
> +#endif
Since this is an exported header you should use a name that is less
likely to conflict with user macros, something like __WINE_ALLOC_SIZE.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list