[vlc-devel] [vlc-commits] modules: use TEXT() for strings calling wide char Win32 APIs
robux4 at ycbcr.xyz
Thu Apr 4 06:21:29 CEST 2019
> On 3 Apr 2019, at 21:23, Rémi Denis-Courmont <remi at remlab.net> wrote:
> Le keskiviikkona 3. huhtikuuta 2019, 10.56.02 EEST Steve Lhomme a écrit :
>> vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Apr 3 08:52:35
>> 2019 +0200| [238807626113d398df07bbf11caa6efff99fcb09] | committer: Steve
>> modules: use TEXT() for strings calling wide char Win32 APIs
> No. Wide char is L, as in L"foobar".
>> _T() is for TCHAR
> AFAIK, TEXT and _T are essentially the same. I don't exactly understand the
Technically it's possible to have TEXT define wide chars literal strings and _T define single byte literal strings if the UNICODE and _UNICODE defines are mismatched.
_T is the preferred (and correct) way when setting a string litteral on a TCHAR variable. But if you don't use a TCHAR you don't need it (nor tchar.h). There is the more common/generic TEXT macro for that. That's also what the Windows headers use on MS and MingW toolchains.
TCHAR was historically used for variables when compiling the same codebase for ANSI and Unicode by setting or not the _UNICODE define. Our code has not been compiling against the ANSI API for ages, especially since we forced the UNICODE define. I don't think there's a reason to bring back this feature and thus relying on tchar.h to do it.
> Rémi Denis-Courmont
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
More information about the vlc-devel