mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
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:
parent
c36ae25028
commit
d763014aa5
9 changed files with 27 additions and 136 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue