Comment on Never create Ruby strings longer than 23 charactersparentComments−Dylan1680712yGood question. In a really roundabout way it manages to be the same size as the alternative struct.Edit: I missed that part of that was another union, removed what I said about it being off on 32 bit.I still don't understand why they go so roundabout by dividing by one and casting to int...−Sharlin12yActually in C and C++, longs are 32 bit on most 32-bit platforms. If you need a 64-bit integer type, you need either "long long" or some implementation-specific equivalent.−Dylan1680712yI know that, I misread it as using two longs plus two pointers, fixed it now.
Comments
Good question. In a really roundabout way it manages to be the same size as the alternative struct.
Edit: I missed that part of that was another union, removed what I said about it being off on 32 bit.
I still don't understand why they go so roundabout by dividing by one and casting to int...
Actually in C and C++, longs are 32 bit on most 32-bit platforms. If you need a 64-bit integer type, you need either "long long" or some implementation-specific equivalent.
I know that, I misread it as using two longs plus two pointers, fixed it now.