(NSDecrementExtraRefCountWasZero): Return correct value.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@452 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
mccallum 1995-06-28 22:56:42 +00:00
parent 379998f2bb
commit 89c02c3a8b

View file

@ -70,17 +70,15 @@ void NSIncrementExtraRefCount(id anObject)
BOOL NSDecrementExtraRefCountWasZero(id anObject) BOOL NSDecrementExtraRefCountWasZero(id anObject)
{ {
BOOL wasZero = YES;
coll_node_ptr n; coll_node_ptr n;
n = coll_hash_node_for_key(retain_counts, anObject); n = coll_hash_node_for_key(retain_counts, anObject);
if (n) if (!n) return wasZero;
{ if (n->value.unsigned_int_u) wasZero = NO;
(n->value.unsigned_int_u)--; if (!--n->value.unsigned_int_u)
if (n->value.unsigned_int_u) coll_hash_remove(retain_counts, anObject);
return NO; return wasZero;
coll_hash_remove(retain_counts, anObject);
}
return YES;
} }
@implementation NSObject @implementation NSObject