Fix the fast path. It should fall back to doing what the slow path does if the other half is not using it.

main
theraven 15 years ago
parent 3e88293f74
commit 55191e34ae

@ -71,8 +71,12 @@ id objc_retainAutoreleasedReturnValue(id obj)
return objc_retain(obj);
#else
id old = pthread_getspecific(ReturnRetained);
pthread_setspecific(ReturnRetained, NULL);
return old;
if (obj != old)
{
objc_autorelease(old);
objc_retain(obj);
}
return obj;
#endif
}

Loading…
Cancel
Save