further cleanup ... always use -zone method to get an object's zone ...

so people can safely write subclasses using different allocation schemes.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29847 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2010-03-05 09:30:18 +00:00
parent 4451967349
commit 39fc4419b0
22 changed files with 133 additions and 108 deletions

View file

@ -157,7 +157,7 @@ static SEL objSel;
[aCoder decodeValueOfObjCType: @encode(NSUInteger)
at: &count];
GSIMapInitWithZoneAndCapacity(&map, GSObjCZone(self), count);
GSIMapInitWithZoneAndCapacity(&map, [self zone], count);
while (count-- > 0)
{
(*imp)(aCoder, sel, type, &key);
@ -173,7 +173,7 @@ static SEL objSel;
{
NSUInteger i;
GSIMapInitWithZoneAndCapacity(&map, GSObjCZone(self), c);
GSIMapInitWithZoneAndCapacity(&map, [self zone], c);
for (i = 0; i < c; i++)
{
GSIMapNode node;
@ -212,7 +212,7 @@ static SEL objSel;
- (id) initWithDictionary: (NSDictionary*)other
copyItems: (BOOL)shouldCopy
{
NSZone *z = GSObjCZone(self);
NSZone *z = [self zone];
NSUInteger c = [other count];
GSIMapInitWithZoneAndCapacity(&map, z, c);
@ -366,7 +366,7 @@ static SEL objSel;
/* Designated initialiser */
- (id) initWithCapacity: (NSUInteger)cap
{
GSIMapInitWithZoneAndCapacity(&map, GSObjCZone(self), cap);
GSIMapInitWithZoneAndCapacity(&map, [self zone], cap);
return self;
}

View file

@ -23,6 +23,7 @@
*/
#import "common.h"
#import "Foundation/NSDebug.h"
#import "Foundation/NSException.h"
#import "GNUstepBase/NSAttributedString+GNUstepBase.h"
#import "GNUstepBase/NSDebug+GNUstepBase.h"