[PATCH 0/1] MR69: include: Add __WINE_MALLOC attribute and use it for allocation functions.

Brendan Shanks (@bshanks) wine at gitlab.winehq.org
Sun May 15 23:27:34 CDT 2022


I was planning to do it separately, but yep I can add the deallocator to this series.

I was going to use a separate define (something like __WINE_DEALLOC), since as mentioned it could also be useful for non-malloc functions like fopen/fclose, SysAllocString/SysFreeString, etc.

And agreed, I don’t know what they were thinking by overloading the long-preexisting malloc attribute for this. If nothing else, it prevents the use of __has_attribute to detect the deallocator version, and checking the GNUC version must be done instead.

-- 
https://gitlab.winehq.org/wine/wine/-/merge_requests/69#note_873



More information about the wine-devel mailing list