On Feb 28, 2010, at 4:18 PM, Krzysztof Kosiński wrote:
Now a cast to unsigned long was missing. I hope it works now. Sorry for problems.
W dniu 1 marca 2010 01:01 użytkownik Jon Cruz <jon@...18...> napisał:
I see you ignored the comment on that bug/patch about using C++ casts and not C casts. Are you familiar wit the difference between them?
Yes, I can change the snippet in script.cpp to reinterpret_cast if you like. I was just in a hurry to fix a build break and forgot about it. In any case, the relevant part of code calls C functions
Yes, but the key thing here is that we're in C++ code and using a C++ compiler.
Those things were added to C++ for safety, etc. We need to use them wherever possible.
One of the BIG things that gives us is the ability to search and spot bad casts, improper algorithms, etc.
Also... "in a hurry" is exactly when one *needs* to focus on quality and care. Otherwise you get in this situation where you have breakage on top of breakage that comes from being reactive.
Oh, and the root cause here is that NO casts to unsigned long should have been used. In Win64 you have the situation where Microsoft went with LLP64 instead of LP64 so that LONG is the same as INT (both stay 32-bit), while pointers such as HINSTANCE go to 64 bit.
I have a cleanup almost done. I'm checking a local compile and then I can check in.