RESOLVED FIXED 57191
[WIN] Use WCHAR instead of TCHAR
https://bugs.webkit.org/show_bug.cgi?id=57191
Summary [WIN] Use WCHAR instead of TCHAR
Patrick R. Gansterer
Reported 2011-03-27 14:50:50 PDT
[WIN] Use WCHAR instead of TCHAR
Attachments
Patch (16.38 KB, patch)
2011-03-27 15:00 PDT, Patrick R. Gansterer
no flags
Patch (16.61 KB, patch)
2011-03-27 15:54 PDT, Patrick R. Gansterer
aroben: review+
Patrick R. Gansterer
Comment 1 2011-03-27 15:00:14 PDT
WebKit Review Bot
Comment 2 2011-03-27 15:01:57 PDT
Attachment 87086 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit/win/ChangeLog', u'Source/Web..." exit_code: 1 Source/WebKit/win/WebKitDLL.cpp:42: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 1 in 9 files If any of these errors are false positives, please file a bug against check-webkit-style.
Build Bot
Comment 3 2011-03-27 15:47:07 PDT
Patrick R. Gansterer
Comment 4 2011-03-27 15:54:52 PDT
WebKit Review Bot
Comment 5 2011-03-27 15:56:31 PDT
Attachment 87090 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit/win/ChangeLog', u'Source/Web..." exit_code: 1 Source/WebKit/win/WebKitDLL.cpp:42: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 1 in 9 files If any of these errors are false positives, please file a bug against check-webkit-style.
Adam Roben (:aroben)
Comment 6 2011-03-28 05:36:40 PDT
Comment on attachment 87090 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=87090&action=review I'm surprised that the wchar.h includes are needed. Do you have any opinion on WCHAR vs. wchar_t? >> Source/WebKit/win/WebKitDLL.cpp:42 >> +#include <wchar.h> > > Alphabetical sorting problem. [build/include_order] [4] You should fix this.
Patrick R. Gansterer
Comment 7 2011-03-28 05:41:02 PDT
(In reply to comment #6) > I'm surprised that the wchar.h includes are needed. I'm not sure if they are needed, but the w* functions are declared in wchar.h. IMHO it should be included. > Do you have any opinion on WCHAR vs. wchar_t? Not realy, but i think WCHAR is better since the windows xxxW functions use WCHAR for parameters too. > >> Source/WebKit/win/WebKitDLL.cpp:42 > >> +#include <wchar.h> > > > > Alphabetical sorting problem. [build/include_order] [4] > > You should fix this. I'll do.
Alexey Proskuryakov
Comment 8 2011-03-28 10:48:44 PDT
This looks somewhat strange to me. WCHAR and wchar_t are different types, why is calling functions like wcslen() on WCHAR[] ok? It's confusing at best.
Patrick R. Gansterer
Comment 9 2011-03-28 11:00:50 PDT
(In reply to comment #8) > This looks somewhat strange to me. WCHAR and wchar_t are different types, why is calling functions like wcslen() on WCHAR[] ok? WCHAR is only a typdef to wchar_t, but most (all?) wide character windows api function use the WCHAR typedef for declaring the arguments. > It's confusing at best. It's windows. ;-)
Alexey Proskuryakov
Comment 10 2011-03-28 11:05:23 PDT
Indeed.
Patrick R. Gansterer
Comment 11 2011-03-29 11:08:36 PDT
Note You need to log in before you can comment on or make changes to this bug.