fgouget at free.fr
Thu Feb 1 04:36:52 CST 2001
On Thu, 1 Feb 2001, Francois Gouget wrote:
> On Mon, 29 Jan 2001, Jon Griffiths wrote:
> > Hi,
> > This patch removes the warnings from the WINE_UNICODE_TEXT macro and fixes an
> > obscure (read: uninvestgated) bug where the value of WCHAR('x') + 1 is off by
> You mean WINE_UNICODE_TEXT('x')+1 != WINE_UNICODE_TEXT('y') ?
> I see why this could happen: gcc considers that the expression is of
> type WCHAR* and since sizeof(WCHAR)==2, it just adds two.
Actually I suspect there's another problem with your patch. since you
cast the return values to void*, WINE_UNICODE_TEXT("abc")+1 will very
likely be wrong. Also I believe void* arithmetic is a gcc extension.
Do you have a lot of places where your application uses
WINE_UNICODE_TEXT with a character? I just know of a <10 places in the
MFC. Alexandre suggests we just handle the string case and let it fail
at compile time if it is used with a char. It may be better than
compiling fine but doing incorrect things.
Francois Gouget fgouget at free.fr http://fgouget.free.fr/
Any sufficiently advanced Operating System is indistinguishable from Linux
More information about the wine-devel