I have just read about the size_t problem here : http://blogs.hoopoe-cloud.com/index.php/2009/09/sizet-net-and-native-code/
Do you have a solution for this with Cloo ?
No. Or rather, I don''t think this is such big an issue as to deserve its own type. Cloo uses IntPtrs for the internal bits and longs for the public API. Works flawlessly in both 32 and 64 bits.
The main point of SizeT is introducing +,-,* and / over IntPtr. But frankly, I can't see why. I have never used IntPtr for arithmetic operations nor have I seen code that does that. Also memory handling in .NET is done through IntPtr (pointers, sizes) and that means that unnecessary casts are introduced.
Last but not least: casting IntPtr to int/long and back is faster than running your own number type anyway.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.