[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Side effect of r35304: "Use GSSelectorTypesMatch() for types compari
From: |
David Chisnall |
Subject: |
Re: Side effect of r35304: "Use GSSelectorTypesMatch() for types comparison..." |
Date: |
Mon, 20 Aug 2012 09:06:00 +0100 |
On 19 Aug 2012, at 22:25, Ivan Vučica wrote:
> This code takes care of possibility that CGPoint, the native point type that
> I work with, has different data types than NSPoint. Under GNUstep, it trips
> up in case the data types are the same.
>
It sounds like you're spending a lot of effort working around obscure corner
cases that almost certainly will never appear in the wild. CGPoint and NSPoint
are supposed to be identical and code is allowed to cast between them and, more
importantly, lots of existing code casts between arrays of NSPoint and arrays
of CGPoint.
C structs are just blobs of memory. If they are structurally equivalent then,
for all practical purposes, they are interchangeable.
David
-- Sent from my PDP-11