[webkit-dev] type of JSChar

Simon Hausmann hausmann at kde.org
Fri Jul 27 02:51:40 PDT 2007


Hi,

during our work on making the Qt port of WebKit compile on Windows with MSVC 
and MingW g++ we ran into the following code in 
JavaScriptCore/API/JSStringRef.h:

...
#if !defined(WIN32) && !defined(_WIN32)
    typedef unsigned short JSChar;
#else
    typedef wchar_t JSChar;
#endif
...

JSChar being defined as wchar_t caused compiles problems for us inside WebCore 
itself when converting from JSChar to UChar. For now we added a || 
defined(__BUILDING_QT) to the condition, but we're wondering why JSChar is 
defined as wchar_t on Windows in the first place. We ran into this problem 
only when compiling with g++, MSVC seems to silently convert wchar_t to 
unsigned short.

Unfortunately the svn history does not provide anything regard this #ifdef 
since it was added to the svn repository.

Does anybody know/remember why JSChar is defined to wchar_t on Windows and if 
it is still needed?


Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.macosforge.org/pipermail/webkit-dev/attachments/20070727/72a977b6/attachment.bin


More information about the webkit-dev mailing list