mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-20 20:26:42 +00:00
Applied fixes for map table changes.
Also fixes for GSMime set methods git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@13727 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ecbcc202a1
commit
106faffbd9
10 changed files with 264 additions and 132 deletions
|
@ -173,13 +173,16 @@ NSCompareMapTables(NSMapTable *table1, NSMapTable *table2)
|
|||
{
|
||||
NSMapEnumerator enumerator = GSIMapEnumeratorForMap((GSIMapTable)t1);
|
||||
GSIMapNode n;
|
||||
|
||||
while ((n = GSIMapEnumeratorNextNode(&enumerator)) != 0)
|
||||
{
|
||||
if (GSIMapNodeForKey(t2, n->key) == 0)
|
||||
{
|
||||
GSIMapEndEnumerator((GSIMapEnumerator)&enumerator);
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
GSIMapEndEnumerator((GSIMapEnumerator)&enumerator);
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
|
@ -209,6 +212,7 @@ NSCopyMapTableWithZone(NSMapTable *table, NSZone *zone)
|
|||
{
|
||||
GSIMapAddPair(t, n->key, n->value);
|
||||
}
|
||||
GSIMapEndEnumerator((GSIMapEnumerator)&enumerator);
|
||||
|
||||
return (NSMapTable*)t;
|
||||
}
|
||||
|
@ -295,9 +299,7 @@ NSEndMapTableEnumeration(NSMapEnumerator *enumerator)
|
|||
NSWarnFLog(@"Nul enumerator argument supplied");
|
||||
return;
|
||||
}
|
||||
#if GS_WITH_GC
|
||||
memset(enumerator, 0, sizeof(*enumerator));
|
||||
#endif
|
||||
GSIMapEndEnumerator((GSIMapEnumerator)enumerator);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue