[PATCH 0/1] MR3662: include: Annotate _mbsdup with __WINE_(DEALLOC|MALLOC).
From: Alex Henrie <alexhenrie24(a)gmail.com> --- include/msvcrt/mbstring.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/msvcrt/mbstring.h b/include/msvcrt/mbstring.h index 28a0e41f10d..eef3b7f5d1e 100644 --- a/include/msvcrt/mbstring.h +++ b/include/msvcrt/mbstring.h @@ -21,6 +21,7 @@ #define __WINE_MBSTRING_H #include <corecrt.h> +#include <corecrt_malloc.h> #include <pshpack8.h> @@ -72,7 +73,7 @@ _ACRTIMP int __cdecl _mbscoll(const unsigned char*,const unsigned cha _ACRTIMP unsigned char* __cdecl _mbscpy(unsigned char*,const unsigned char*); _ACRTIMP size_t __cdecl _mbscspn(const unsigned char*,const unsigned char*); _ACRTIMP unsigned char* __cdecl _mbsdec(const unsigned char*,const unsigned char*); -_ACRTIMP unsigned char* __cdecl _mbsdup(const unsigned char*); +_ACRTIMP unsigned char* __cdecl _mbsdup(const unsigned char*) __WINE_DEALLOC(free) __WINE_MALLOC; _ACRTIMP int __cdecl _mbsicmp(const unsigned char*,const unsigned char*); _ACRTIMP int __cdecl _mbsicoll(const unsigned char*,const unsigned char*); _ACRTIMP unsigned char* __cdecl _mbsinc(const unsigned char*); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/3662
This merge request was approved by Piotr Caban. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3662
Alexandre Julliard (@julliard) commented about include/msvcrt/mbstring.h:
#define __WINE_MBSTRING_H
#include <corecrt.h> +#include <corecrt_malloc.h> That doesn't seem to match the MS headers.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/3662#note_43760
On Tue Aug 29 20:40:56 2023 +0000, Alexandre Julliard wrote:
That doesn't seem to match the MS headers. corecrt.h and corecrt_wstring.h don't include corecrt_malloc.h on Windows either, but it was decided in merge request !1686 to include it anyway to allow annotating _strdup and _wcsdup with __WINE_DEALLOC(free). I thought that we would want to do the same for _mbsdup for consistency, although it is not as important because _mbsdup is never used in Wine code.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/3662#note_43858
On Fri Oct 6 15:51:55 2023 +0000, Alex Henrie wrote:
string.h and corecrt_wstring.h don't include corecrt_malloc.h on Windows either, but it was decided in merge request !1686 to include it anyway to allow annotating _strdup and _wcsdup with __WINE_DEALLOC(free). I thought that we would want to do the same for _mbsdup for consistency, although it is not as important because _mbsdup is never used in Wine code. Should we close this MR?
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/3662#note_51905
On Fri Nov 10 10:44:35 2023 +0000, Piotr Caban wrote:
Should we close this MR? Yes, it's not worth introducing an incompatibility for a function that's never used.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/3662#note_52100
This merge request was closed by Alexandre Julliard. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3662
participants (4)
-
Alex Henrie -
Alex Henrie (@alexhenrie) -
Alexandre Julliard (@julliard) -
Piotr Caban (@piotr)