Re: [PATCH 2/4] ucrtbase: Forward _calloc_base to MSVCRT_calloc.
On 14.06.2016 20:28, Alex Henrie wrote:
Cc: Piotr Caban <piotr(a)codeweavers.com>
For https://bugs.winehq.org/show_bug.cgi?id=40796
The Windows 10 SDK helpfully explains that calloc simply wraps _calloc_dbg if _DEBUG is defined and _calloc_base if _DEBUG is not defined. Since Wine will not be implementing _calloc_dbg because it is only available in debug builds of the C runtime library, we can make _calloc_base wrap calloc instead.
Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> --- dlls/api-ms-win-crt-heap-l1-1-0/api-ms-win-crt-heap-l1-1-0.spec | 2 +- dlls/ucrtbase/ucrtbase.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Martin Storsjo tried the same approach already, and it was rejected. If I remember correctly separate wrapper functions were preferred in this case.
2016-06-14 12:39 GMT-06:00 Sebastian Lackner <sebastian(a)fds-team.de>:
On 14.06.2016 20:28, Alex Henrie wrote:
Cc: Piotr Caban <piotr(a)codeweavers.com>
For https://bugs.winehq.org/show_bug.cgi?id=40796
The Windows 10 SDK helpfully explains that calloc simply wraps _calloc_dbg if _DEBUG is defined and _calloc_base if _DEBUG is not defined. Since Wine will not be implementing _calloc_dbg because it is only available in debug builds of the C runtime library, we can make _calloc_base wrap calloc instead.
Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> --- dlls/api-ms-win-crt-heap-l1-1-0/api-ms-win-crt-heap-l1-1-0.spec | 2 +- dlls/ucrtbase/ucrtbase.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Martin Storsjo tried the same approach already, and it was rejected. If I remember correctly separate wrapper functions were preferred in this case.
It looks like Alexandre said "It would be better to create a separate function, unless there is strong evidence that they are doing the exact same thing." [1][2] There is strong evidence that they are doing the exact same thing, but if you need me to write a test case to provide ironclad evidence, I can do that. -Alex [1] https://www.winehq.org/pipermail/wine-patches/2015-August/141294.html [2] https://www.winehq.org/pipermail/wine-devel/2015-August/108876.html
participants (2)
-
Alex Henrie -
Sebastian Lackner