cleanup fast enumeration issues

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29647 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2010-02-15 16:56:31 +00:00
parent c36ae25028
commit d763014aa5
9 changed files with 27 additions and 136 deletions

View file

@ -354,14 +354,15 @@ static SEL objSel;
}
return nil;
}
- (NSUInteger) countByEnumeratingWithState: (NSFastEnumerationState*)state
objects: (id*)stackbuf
count: (NSUInteger)len
{
state->mutationsPtr = (unsigned long *)self;
return GSIMapCountByEnumeratingWithStateObjectsCount(&map, state, stackbuf, len);
state->mutationsPtr = (unsigned long *)self;
return GSIMapCountByEnumeratingWithStateObjectsCount
(&map, state, stackbuf, len);
}
@end
@implementation GSMutableDictionary
@ -468,8 +469,9 @@ static SEL objSel;
objects: (id*)stackbuf
count: (NSUInteger)len
{
state->mutationsPtr = (unsigned long *)&_version;
return GSIMapCountByEnumeratingWithStateObjectsCount(&map, state, stackbuf, len);
state->mutationsPtr = (unsigned long *)&_version;
return GSIMapCountByEnumeratingWithStateObjectsCount
(&map, state, stackbuf, len);
}
@end