@@ -104,32 +104,32 @@ enum {
104104/* Runtime entry point called by compiler when assigning objects inside copy helper routines */
105105ZTD_USE (ZTD_BLOCKS_API_LINKAGE )
106106ZTD_USE (ZTD_EXTERN_C )
107- void _Block_object_assign (void * destAddr , const void * object , const int flags ) ZTD_USE (ZTD_ATTR_WEAK );
107+ void _Block_object_assign (void * destAddr , const void * object , const int flags ) ZTD_USE (ZTD_ATTR_WEAK_FUNC );
108108/* BLOCK_FIELD_IS_BYREF is only used from within block copy helpers */
109109
110110
111111/* runtime entry point called by the compiler when disposing of objects inside dispose helper routine */
112112ZTD_USE (ZTD_BLOCKS_API_LINKAGE )
113- ZTD_USE (ZTD_EXTERN_C ) void _Block_object_dispose (const void * object , const int flags ) ZTD_USE (ZTD_ATTR_WEAK );
113+ ZTD_USE (ZTD_EXTERN_C ) void _Block_object_dispose (const void * object , const int flags ) ZTD_USE (ZTD_ATTR_WEAK_FUNC );
114114
115115
116116
117117/* Other support functions */
118118
119119/* Runtime entry to get total size of a closure */
120120ZTD_USE (ZTD_BLOCKS_API_LINKAGE )
121- ZTD_USE (ZTD_EXTERN_C ) unsigned long int Block_size (void * block_basic ) ZTD_USE (ZTD_ATTR_WEAK );
121+ ZTD_USE (ZTD_EXTERN_C ) unsigned long int Block_size (void * block_basic ) ZTD_USE (ZTD_ATTR_WEAK_FUNC );
122122
123123
124124
125125/* the raw data space for runtime classes for blocks */
126126/* class+meta used for stack, malloc, and collectable based blocks */
127- ZTD_USE (ZTD_BLOCKS_API_LINKAGE ) ZTD_USE (ZTD_EXTERN_C ) void * _NSConcreteStackBlock [32 ] ZTD_USE (ZTD_ATTR_WEAK );
128- ZTD_USE (ZTD_BLOCKS_API_LINKAGE ) ZTD_USE (ZTD_EXTERN_C ) void * _NSConcreteMallocBlock [32 ] ZTD_USE (ZTD_ATTR_WEAK );
129- ZTD_USE (ZTD_BLOCKS_API_LINKAGE ) ZTD_USE (ZTD_EXTERN_C ) void * _NSConcreteAutoBlock [32 ] ZTD_USE (ZTD_ATTR_WEAK );
130- ZTD_USE (ZTD_BLOCKS_API_LINKAGE ) ZTD_USE (ZTD_EXTERN_C ) void * _NSConcreteFinalizingBlock [32 ] ZTD_USE (ZTD_ATTR_WEAK );
131- ZTD_USE (ZTD_BLOCKS_API_LINKAGE ) ZTD_USE (ZTD_EXTERN_C ) void * _NSConcreteGlobalBlock [32 ] ZTD_USE (ZTD_ATTR_WEAK );
132- ZTD_USE (ZTD_BLOCKS_API_LINKAGE ) ZTD_USE (ZTD_EXTERN_C ) void * _NSConcreteWeakBlockVariable [32 ] ZTD_USE (ZTD_ATTR_WEAK );
127+ ZTD_USE (ZTD_BLOCKS_API_LINKAGE ) ZTD_USE (ZTD_EXTERN_C ) void * _NSConcreteStackBlock [32 ] ZTD_USE (ZTD_ATTR_WEAK_VAR );
128+ ZTD_USE (ZTD_BLOCKS_API_LINKAGE ) ZTD_USE (ZTD_EXTERN_C ) void * _NSConcreteMallocBlock [32 ] ZTD_USE (ZTD_ATTR_WEAK_VAR );
129+ ZTD_USE (ZTD_BLOCKS_API_LINKAGE ) ZTD_USE (ZTD_EXTERN_C ) void * _NSConcreteAutoBlock [32 ] ZTD_USE (ZTD_ATTR_WEAK_VAR );
130+ ZTD_USE (ZTD_BLOCKS_API_LINKAGE ) ZTD_USE (ZTD_EXTERN_C ) void * _NSConcreteFinalizingBlock [32 ] ZTD_USE (ZTD_ATTR_WEAK_VAR );
131+ ZTD_USE (ZTD_BLOCKS_API_LINKAGE ) ZTD_USE (ZTD_EXTERN_C ) void * _NSConcreteGlobalBlock [32 ] ZTD_USE (ZTD_ATTR_WEAK_VAR );
132+ ZTD_USE (ZTD_BLOCKS_API_LINKAGE ) ZTD_USE (ZTD_EXTERN_C ) void * _NSConcreteWeakBlockVariable [32 ] ZTD_USE (ZTD_ATTR_WEAK_VAR );
133133
134134
135135/* the intercept routines that must be used under GC */
@@ -138,25 +138,26 @@ ZTD_USE(ZTD_EXTERN_C)
138138void _Block_use_GC (void * (* alloc )(const unsigned long , const bool isOne , const bool isObject ),
139139 void (* setHasRefcount )(const void * , const bool ), void (* gc_assign_strong )(void * , void * * ),
140140 void (* gc_assign_weak )(const void * , void * ), void (* gc_memmove )(void * , void * , unsigned long ))
141- ZTD_USE (ZTD_ATTR_WEAK );
141+ ZTD_USE (ZTD_ATTR_WEAK_FUNC );
142142
143143/* earlier version, now simply transitional */
144144ZTD_USE (ZTD_BLOCKS_API_LINKAGE )
145145ZTD_USE (ZTD_EXTERN_C )
146146void _Block_use_GC5 (void * (* alloc )(const unsigned long , const bool isOne , const bool isObject ),
147147 void (* setHasRefcount )(const void * , const bool ), void (* gc_assign_strong )(void * , void * * ),
148- void (* gc_assign_weak )(const void * , void * )) ZTD_USE (ZTD_ATTR_WEAK );
148+ void (* gc_assign_weak )(const void * , void * )) ZTD_USE (ZTD_ATTR_WEAK_FUNC );
149149
150150ZTD_USE (ZTD_BLOCKS_API_LINKAGE )
151151ZTD_USE (ZTD_EXTERN_C )
152- void _Block_use_RR (void (* retain )(const void * ), void (* release )(const void * )) ZTD_USE (ZTD_ATTR_WEAK );
152+ void _Block_use_RR (void (* retain )(const void * ), void (* release )(const void * )) ZTD_USE (ZTD_ATTR_WEAK_FUNC );
153153
154154/* make a collectable GC heap based Block. Not useful under non-GC. */
155155ZTD_USE (ZTD_BLOCKS_API_LINKAGE )
156- ZTD_USE (ZTD_EXTERN_C ) void * _Block_copy_collectable (const void * aBlock ) ZTD_USE (ZTD_ATTR_WEAK );
156+ ZTD_USE (ZTD_EXTERN_C ) void * _Block_copy_collectable (const void * aBlock ) ZTD_USE (ZTD_ATTR_WEAK_FUNC );
157157
158158/* thread-unsafe diagnostic */
159- ZTD_USE (ZTD_BLOCKS_API_LINKAGE ) ZTD_USE (ZTD_EXTERN_C ) const char * _Block_dump (const void * block ) ZTD_USE (ZTD_ATTR_WEAK );
159+ ZTD_USE (ZTD_BLOCKS_API_LINKAGE )
160+ ZTD_USE (ZTD_EXTERN_C ) const char * _Block_dump (const void * block ) ZTD_USE (ZTD_ATTR_WEAK_FUNC );
160161
161162
162163/* Obsolete */
0 commit comments