mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 08:41:03 +00:00
GC changes for MacOS-X compatiblity
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27630 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
8a5a8ba8eb
commit
c41bdeb638
20 changed files with 537 additions and 294 deletions
|
@ -227,7 +227,11 @@ static Class mutableSetClass;
|
|||
|
||||
(*imp)(aCoder, sel, @encode(unsigned), &count);
|
||||
|
||||
#if GS_WITH_GC
|
||||
GSIMapInitWithZoneAndCapacity(&map, GSScannedMallocZone(), count);
|
||||
#else
|
||||
GSIMapInitWithZoneAndCapacity(&map, [self zone], count);
|
||||
#endif
|
||||
while (count-- > 0)
|
||||
{
|
||||
(*imp)(aCoder, sel, type, &value);
|
||||
|
@ -242,7 +246,11 @@ static Class mutableSetClass;
|
|||
{
|
||||
unsigned i;
|
||||
|
||||
#if GS_WITH_GC
|
||||
GSIMapInitWithZoneAndCapacity(&map, GSScannedMallocZone(), c);
|
||||
#else
|
||||
GSIMapInitWithZoneAndCapacity(&map, [self zone], c);
|
||||
#endif
|
||||
for (i = 0; i < c; i++)
|
||||
{
|
||||
GSIMapNode node;
|
||||
|
@ -576,7 +584,11 @@ static Class mutableSetClass;
|
|||
/* Designated initialiser */
|
||||
- (id) initWithCapacity: (unsigned)cap
|
||||
{
|
||||
#if GS_WITH_GC
|
||||
GSIMapInitWithZoneAndCapacity(&map, GSScannedMallocZone(), cap);
|
||||
#else
|
||||
GSIMapInitWithZoneAndCapacity(&map, [self zone], cap);
|
||||
#endif
|
||||
return self;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue