[Webkit-unassigned] [Bug 93255] [GTK] Webkit 1.8.2 fails to build with MinGW with spellchecking enabled

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Sep 24 09:09:49 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=93255





--- Comment #9 from Kalev Lember <kalevlember at gmail.com>  2012-09-24 09:10:17 PST ---
(In reply to comment #8)
> Okay. This sounds reasonable. I'm a bit surprised that pointers of the same size require a reinterpet_cast to switch between them though. Do you understand why it's necessary here?

I believe reinterpret_cast is needed because static_cast doesn't cast between unrelated pointer types, even if the sizes of the types pointed to match. On Linux, UChar is an integer type and static_cast works because it's casting from one type of integer to another, which are naturally convertible. But on Windows, UChar is a wchar_t and it's not implicitly convertible to an integer.


> Can you double-check by printing sizeof for both types?
I don't currently have a webkitgtk win32 build at hand to instrument the source code there, but a quick test with sizeof:

> $ cat kala.cpp
> #include <glib.h>
> #include <iostream>
> 
> int main()
> {
>     std::cout << "sizeof wchar_t: " << sizeof (wchar_t) << std::endl;
>     std::cout << "sizeof guint16: " << sizeof (guint16) << std::endl;
>     return 0;
> }
> 
> $ i686-w64-mingw32-g++ kala.cpp `i686-w64-mingw32-pkg-config --cflags glib-2.0` -o kala.exe
> $ wine kala.exe
> sizeof wchar_t: 2
> sizeof guint16: 2

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list