[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CGPoint support in NSValue

From: Ivan Vučica
Subject: Re: CGPoint support in NSValue
Date: Wed, 11 Mar 2015 20:46:05 +0000

On Wed, Mar 11, 2015 at 8:39 AM, Fred Kiefer <address@hidden> wrote:
Sorry, I am be a little confused here, what is the difference between @encode(CGPoint) address@hidden(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 

I remember doing something similar in GNUstep's Core Animation:

I think Amr might be trying to get rid of lines 669-683 in this:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]