Re: Help with NSPointerArray and NSMapTable

Christiaan Hofman <[email protected]>
Newsgroups gmane.comp.macosx.devel
Message-ID <[email protected]>
On Sep 24, 2009, at 4:27, Adam R. Maxwell wrote:

>
> On Sep 21, 2009, at 12:14 PM, Christiaan Hofman wrote:
>
>> Apart from this, the 64-bit docs warn against type-casting an  
>> NSInteger as a pointer, but that seems to be exactly what  
>> NSPointerArray expects me to do? If they go against their own docs  
>> I really think they should be more clear.
>
> Can you point to where the docs warn against this?
>
> thanks,
> Adam

Right in the Overview of the NSMapTable documentation:

"It can contain arbitrary pointers (its contents are not constrained  
to being objects).

"Note that only the options listed in “NSMapTableOptions” guarantee  
that the rest of the API will work correctly—including copying,  
archiving, and fast enumeration. If you use other NSPointerFunctions  
options, the map table may not work correctly, or may not even be  
initialized correctly."

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.