windowscodecs: Fix *_CopyPixels functions to properly handle a NULL rectangle

James McKenzie jjmckenzie51 at earthlink.net
Tue Oct 19 23:01:54 CDT 2010


  On 10/18/10 9:53 PM, Vitaliy Margolen wrote:
> On 10/18/2010 12:51 PM, Krzysztof Nowicki wrote:
>> Where I come from copying structures directly is considered bad 
>> practice and
>> it's safer to use memcpy. We had problems before with broken 
>> compilers that
>> would try to do some black magic in such cases.
> Then don't use broken compilers. GCC handles struct copying this just 
> fine. And it's up-to compiler what sort of magic it's uses white or 
> black. As long as struct gets copied you are all set.
>
Actually, gcc modifies the code to do a PROPER memcpy.  Thus you can 
copy the contents of a string using a pointer rather than the string if 
you use variable a = variable b.  Using memcpy might lead to interesting 
results if you do the same thing.
>> If the policy for Wine is to copy structures directly then I'll 
>> respect it.
> I'm not the one setting policies, but that's what you should do - 
> utilize C language constructs instead of going around them.
>
That's very true and this has been a C language construct for quite some 
time.

James McKenzie




More information about the wine-devel mailing list