mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
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:
parent
4451967349
commit
39fc4419b0
22 changed files with 133 additions and 108 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue