184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
|
return value;
}
id
objc_loadWeakRetained(id *object)
{
id value = nil;
struct WeakRef *ref;
#ifdef OF_HAVE_THREADS
if (OFSpinlockLock(&spinlock) != 0)
OBJC_ERROR("Failed to lock spinlock!");
#endif
if (*object != nil &&
(ref = objc_hashtable_get(hashtable, *object)) != NULL)
value = *object;
#ifdef OF_HAVE_THREADS
if (OFSpinlockUnlock(&spinlock) != 0)
OBJC_ERROR("Failed to unlock spinlock!");
#endif
|
<
|
<
|
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
|
return value;
}
id
objc_loadWeakRetained(id *object)
{
id value = nil;
#ifdef OF_HAVE_THREADS
if (OFSpinlockLock(&spinlock) != 0)
OBJC_ERROR("Failed to lock spinlock!");
#endif
if (*object != nil && objc_hashtable_get(hashtable, *object) != NULL)
value = *object;
#ifdef OF_HAVE_THREADS
if (OFSpinlockUnlock(&spinlock) != 0)
OBJC_ERROR("Failed to unlock spinlock!");
#endif
|