WININET: make WCHAR strings const where possible

Shachar Shemesh wine-devel at shemesh.biz
Sat Apr 17 16:24:47 CDT 2004


Francois Gouget wrote:

> I wrote a teeny test app to check this out and you're right. The static
>
>is crucial. If it's not specified the string is copied to the stack so
>that the const essentially has no effect whatsoever (no compiler warning
>and no runtime error). With 'static const' we still don't get a compiler
>warning (tested with gcc version 3.3.3 (Debian 20040321)) but we get a
>runtime crash, i.e. the string is really const this time.
>  
>
Now try the same prog, only compile it with g++ instead of gcc.
Hmm - doesn't seem to have any important effect :-\

-- 
Shachar Shemesh
Lingnu Open Source Consulting
http://www.lingnu.com/




More information about the wine-devel mailing list