[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Side effect of r35304: "Use GSSelectorTypesMatch() for types compari
From: |
Jens Ayton |
Subject: |
Re: Side effect of r35304: "Use GSSelectorTypesMatch() for types comparison..." |
Date: |
Mon, 20 Aug 2012 19:39:19 +0200 |
On Aug 20, 2012, at 15:32, Dr. H. Nikolaus Schaller <hns@computer.org> wrote:
>
> I.e. since 10.8 you can expect NSPoint and CGPoint to be typedef'd...
>
> But I have no idea how @encode() treats typedefs :)
It doesn't know about typedefs. It just encodes the underlying type.
To rephrase what I said before: in modern Cocoa, NSPoint and CGPoint are in
fact the same type. Keeping them distinct in GNUstep is asking for trouble.
> A final though: NSValue was not designed with CG* in mind. So you can't
> expect it to behave in any way.
This, however, is wrong. NSValue is supposed to support any blob of data (POD
type in C++ terminology) for which there is a valid @encode string.
--
Jens Ayton