On Tue, 8 Jan 2002, Alexandre Julliard wrote:
The reason is very simple: WideCharXXX are Windows API, HEAP_strdupA/W are not.
I have supported your effort for getting rid of the HEAP_strdupA/W calls for this very reason: I strongly believe using the standard API is very important for too many reasons to list here.
However, looking over the code with critical eye, I realized that we are uglifing/obfuscating the code with this change, rather then cleaning it up. As a result, I've been kindda torn between the desire to use a standard API, and the aesthetics of the code base.
Now, thinking about the problem, I realized that the strdupA/W is not a standard Windows API because apps should not typically need it, while it is _clearly_ needed as an internal API for the Win32 API.
What would be wrong with:
LPSTR wine_strdupWtoA(LPCWSTR); LPWSTR wine_strdupAtoW(LPCSTR); void wine_strfreeA(LPSTR); void wine_strfreeW(LPWSTR) exported from, say, ntdll?
Besides, they can remain inlined (as they are now), so they don't really need to be exported from anywhere.
-- Dimi.