Re: runtime and type encoding confusion on 64-bit

Christiaan Hofman <[email protected]>
Newsgroups gmane.comp.macosx.devel
Message-ID <[email protected]>
On Sep 5, 2009, at 19:34, Graham Lee wrote:

> On Sep 5, 2009, at 17:41 , Shantonu Sen wrote:
>
>> Did you look at the prototype?
>>
>> OBJC_EXPORT Ivar object_getInstanceVariable(id obj, const char  
>> *name, void **outValue);
>
> The documentation is wrong in that respect. This has been discussed  
> often, examples:
>
> http://stackoverflow.com/questions/1219081/objectgetinstancevariable-works-for-float-int-bool-but-not-for-double
> http://lists.apple.com/archives/Objc-language/2008/Nov/msg00027.html
> http://www.cocoabuilder.com/archive/message/cocoa/2003/12/3/80620
>
> Cheers,
> Graham.

Now that's really confusing. Does that mean that  
object_getInstanceVariable actually can be used only for ivars that  
are pointer-size? Is using ivar_getOffset the only way to get a non- 
object ivar? That is also a bit dangerous because it assumes I  
actually know the type of the ivar (which I already indicated is  
wrong, so I expect it to be changed in a future release).

Anyway, thanks for the pointers.

Christiaan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.