minor fixups to last lot of GC changes

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27786 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2009-02-04 20:19:27 +00:00
parent b44f3f55ce
commit 8a72bcc0e9
3 changed files with 26 additions and 5 deletions

View file

@ -209,8 +209,11 @@ NSCopyMapTableWithZone(NSMapTable *table, NSZone *zone)
#if GS_WITH_GC
zone = GSIMapStrongKeyAndVal;
#endif
t = (GSIMapTable)NSAllocateCollectable(sizeof(GSIMapTable_t),
NSScannedOption);
#else
t = (GSIMapTable)NSZoneMalloc(zone, sizeof(GSIMapTable_t));
#endif
GSIMapInitWithZoneAndCapacity(t, zone, ((GSIMapTable)table)->nodeCount);
t->extra.k = ((GSIMapTable)table)->extra.k;
t->extra.v = ((GSIMapTable)table)->extra.v;
@ -275,8 +278,11 @@ NSCreateMapTableWithZone(
#if GS_WITH_GC
zone = GSIMapStrongKeyAndVal;
#endif
table = (GSIMapTable)NSAllocateCollectable(sizeof(GSIMapTable_t),
NSScannedOption);
#else
table = (GSIMapTable)NSZoneMalloc(zone, sizeof(GSIMapTable_t));
#endif
GSIMapInitWithZoneAndCapacity(table, zone, capacity);
table->extra.k = keyCallBacks;
table->extra.v = valueCallBacks;