Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Backticks in Windows Shell/Code::Blocks?
rickg22:
Just a question, why does angelscript deal with void* typecasting? O.o What dark and obscure magic does it use?
takeshimiya:
--- Quote from: rickg22 on January 19, 2006, 01:18:18 am ---Just a question, why does angelscript deal with void* typecasting? O.o What dark and obscure magic does it use?
--- End quote ---
It's filled with void* all over the place. :D
I guess it's the most fastest way to bind functions. There are other ways more elegant and correct (like the ones in boost::function and boost::bind), but aren't as fast.
Game_Ender:
--- Quote from: Takeshi Miya on January 16, 2006, 01:27:02 pm ---int is not long.
int on 64 bits platform is 32 bits if I remember well.
--- End quote ---
In most cases on 64 bit platforms long size = 64 bits = ptr size and on 32 bit platforms long size = 32 bits = ptr size. So you could change all those int's to long's. Or you could replace them with a typedef and have that controlled by a define like "PLATFORM_64_BIT". That way on 32 bit it stays like it is and 64 bit it is proper.
thomas:
...and you could even insert
--- Code: ---if(sizeof(long) != sizeof(void*))
cbThrow(_T("Doom is upon us, the evil seed of pointer hacks spreads. Run! Run!"));
--- End code ---
at an early point to be 100% sure you know why your code crashes if it does.
Navigation
[0] Message Index
[*] Previous page
Go to full version