mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-20 12:16:40 +00:00
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:
parent
b44f3f55ce
commit
8a72bcc0e9
3 changed files with 26 additions and 5 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue