Re: Difference between NSPoint, NSSize, NSRect and the CG Versions


On Aug 31, 2017, at 10:45 AM, Quincey Morris <quinceymorris@...> wrote:

In the 32-bit macOS SDK, they are based on different underlying types. Even if the struct members are the same size (they are, IIRC, all 4 bytes), the difference in type means the NS and CG versions are not technically compatible at the ABI level — at the calling interface between functions, for example.

I don't see how they could be incompatible if they're the same size. The only 4-byte floating point type is 'float', so if the CG and NS types are using the same-size values, how can they be different underlying types?

(I don't remember the details, but perhaps in 32-bit the NS types used float while the CG types used double?)


Join to automatically receive all group messages.