FROM : Sean McBride
DATE : Wed Feb 06 21:47:48 2008
On 2/6/08 7:12 PM, Alastair Houghton said:
>Furthermore I *think* (and this is from memory, based on some work I
>did on GCC several years ago, so I might be wrong) that if you write
>something like
>
> void * __strong MyFunction(void);
>
>you'll find that the __strong attribute is attached to the *function*
>rather than to the type. In any case it's going to be ignored because
>__strong only really affects variables, not types or functions.
Well, NSAllocateCollectable is declared like so in NSZone.h:
FOUNDATION_EXPORT void *__strong NSAllocateCollectable(NSUInteger size,
NSUInteger options) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
And the comment just above says "the pointer type of the stored location
must be marked with the __strong attribute in order for the write-
barrier assignment primitive to be generated".
--
____________________________________________________________
Sean McBride, B. Eng <email_removed>
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
DATE : Wed Feb 06 21:47:48 2008
On 2/6/08 7:12 PM, Alastair Houghton said:
>Furthermore I *think* (and this is from memory, based on some work I
>did on GCC several years ago, so I might be wrong) that if you write
>something like
>
> void * __strong MyFunction(void);
>
>you'll find that the __strong attribute is attached to the *function*
>rather than to the type. In any case it's going to be ignored because
>__strong only really affects variables, not types or functions.
Well, NSAllocateCollectable is declared like so in NSZone.h:
FOUNDATION_EXPORT void *__strong NSAllocateCollectable(NSUInteger size,
NSUInteger options) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
And the comment just above says "the pointer type of the stored location
must be marked with the __strong attribute in order for the write-
barrier assignment primitive to be generated".
--
____________________________________________________________
Sean McBride, B. Eng <email_removed>
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada






Cocoa mail archive

