mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +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
ff7212cf67
commit
6bccff5fc7
20 changed files with 537 additions and 294 deletions
|
@ -156,7 +156,11 @@ static SEL objSel;
|
|||
[aCoder decodeValueOfObjCType: @encode(unsigned)
|
||||
at: &count];
|
||||
|
||||
#if GS_WITH_GC
|
||||
GSIMapInitWithZoneAndCapacity(&map, GSScannedMallocZone(), count);
|
||||
#else
|
||||
GSIMapInitWithZoneAndCapacity(&map, GSObjCZone(self), count);
|
||||
#endif
|
||||
while (count-- > 0)
|
||||
{
|
||||
(*imp)(aCoder, sel, type, &key);
|
||||
|
@ -172,7 +176,11 @@ static SEL objSel;
|
|||
{
|
||||
unsigned int i;
|
||||
|
||||
#if GS_WITH_GC
|
||||
GSIMapInitWithZoneAndCapacity(&map, GSScannedMallocZone(), c);
|
||||
#else
|
||||
GSIMapInitWithZoneAndCapacity(&map, GSObjCZone(self), c);
|
||||
#endif
|
||||
for (i = 0; i < c; i++)
|
||||
{
|
||||
GSIMapNode node;
|
||||
|
@ -214,7 +222,11 @@ static SEL objSel;
|
|||
NSZone *z = GSObjCZone(self);
|
||||
unsigned c = [other count];
|
||||
|
||||
#if GS_WITH_GC
|
||||
GSIMapInitWithZoneAndCapacity(&map, GSScannedMallocZone(), c);
|
||||
#else
|
||||
GSIMapInitWithZoneAndCapacity(&map, z, c);
|
||||
#endif
|
||||
|
||||
if (c > 0)
|
||||
{
|
||||
|
@ -366,7 +378,11 @@ static SEL objSel;
|
|||
/* Designated initialiser */
|
||||
- (id) initWithCapacity: (unsigned)cap
|
||||
{
|
||||
#if GS_WITH_GC
|
||||
GSIMapInitWithZoneAndCapacity(&map, GSScannedMallocZone(), cap);
|
||||
#else
|
||||
GSIMapInitWithZoneAndCapacity(&map, GSObjCZone(self), cap);
|
||||
#endif
|
||||
return self;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue