On Wed, Mar 11, 2015 at 8:39 AM, Fred Kiefer
<fredkiefer@gmx.de> wrote:
Sorry, I am be a little confused here, what is the difference between @encode(CGPoint) and @encode(NSPoint)? Shouldn't these two yield the same result?
Actually, no:
typedef struct _NSPoint
{
float x, y;
} NSPoint;
typedef struct _CGPoint
{
float x, y;
} CGPoint;
int main()
{
printf("%s\n", @encode(NSPoint));
printf("%s\n", @encode(CGPoint));
}
$ ./a.out
{_NSPoint=ff}
{_CGPoint=ff}
I remember doing something similar in GNUstep's Core Animation:
http://comments.gmane.org/gmane.comp.lib.gnustep.general/38548
I think Amr might be trying to get rid of lines 669-683 in this: