[cfe-dev] id and ObjC interfaces
Zhongxing Xu
xuzhongxing at gmail.com
Sat Apr 25 20:24:37 PDT 2009
Thanks for all replies.
2009/4/26 Fariborz Jahanian <fjahanian at apple.com>:
> Type for 'id' is:
>
> typedef struct objc_object {
> Class isa;
> } *id;
>
> 'id' gcc and clang predefine this type. It is essentially a 'void *' for
> objective-c object pointers.
> This does not mean that ObjC interfaces inherit 'id'. It does mean that ObjC
> object pointers can be
> assigned back and force to objects of this type.
>
> - Fariborz
>
> On Apr 24, 2009, at 9:04 PM, Zhongxing Xu wrote:
>
>> Hi all,
>>
>> In clang, type 'id' is implemented as 'typedef struct objc_object *'.
>> And 'id' can points to any ObjC objects. Does that mean that all ObjC
>> interfaces inherits 'struct objc_object' implicitly?
>>
>> -Zhongxing
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
More information about the cfe-dev
mailing list