mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Use -retainCount instead of NSExtraRefCount() in gs_weak_load() so we can support objects that define a custom retain / release mechanism in weak variables.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33478 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1334a3b371
commit
0618607b3a
1 changed files with 1 additions and 1 deletions
|
@ -1005,7 +1005,7 @@ objc_create_block_classes_as_subclasses_of(Class super);
|
|||
#ifdef OBJC_CAP_ARC
|
||||
static id gs_weak_load(id obj)
|
||||
{
|
||||
return (NSExtraRefCount(obj) + 1) > 0 ? obj : nil;
|
||||
return [obj retainCount] > 0 ? obj : nil;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue