mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +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
dacafa7f82
commit
d5d099e7a6
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
|
#ifdef OBJC_CAP_ARC
|
||||||
static id gs_weak_load(id obj)
|
static id gs_weak_load(id obj)
|
||||||
{
|
{
|
||||||
return (NSExtraRefCount(obj) + 1) > 0 ? obj : nil;
|
return [obj retainCount] > 0 ? obj : nil;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue