git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@14969 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2002-11-10 13:56:34 +00:00
parent 4bf7f35f87
commit f6cc9ceb34
5 changed files with 32 additions and 2 deletions

View file

@ -13,6 +13,8 @@
like MacOS and OpenStep spec by having a central mechanism for
generating property lists rather than spreading the code across the
plist classes.
Also ... maintain allocation debug accounting when making objects
immutable.
2002-11-09 Richard Frith-Macdonald <rfm@gnu.org>

View file

@ -481,7 +481,13 @@ static SEL eqSel;
- (id) makeImmutableCopyOnFail: (BOOL)force
{
#ifndef NDEBUG
GSDebugAllocationRemove(isa, self);
#endif
isa = [GSArray class];
#ifndef NDEBUG
GSDebugAllocationAdd(isa, self);
#endif
return self;
}

View file

@ -286,7 +286,13 @@ static SEL objSel;
- (id) makeImmutableCopyOnFail: (BOOL)force
{
#ifndef NDEBUG
GSDebugAllocationRemove(isa, self);
#endif
isa = [GSDictionary class];
#ifndef NDEBUG
GSDebugAllocationAdd(isa, self);
#endif
return self;
}

View file

@ -564,7 +564,13 @@ static Class mutableSetClass;
- (id) makeImmutableCopyOnFail: (BOOL)force
{
#ifndef NDEBUG
GSDebugAllocationRemove(isa, self);
#endif
isa = [GSSet class];
#ifndef NDEBUG
GSDebugAllocationAdd(isa, self);
#endif
return self;
}

View file

@ -2922,10 +2922,20 @@ transmute(ivars self, NSString *aString)
- (id) makeImmutableCopyOnFail: (BOOL)force
{
#ifndef NDEBUG
GSDebugAllocationRemove(isa, self);
#endif
if (_flags.wide == 1)
isa = [GSUnicodeString class];
{
isa = [GSUnicodeString class];
}
else
isa = [GSCString class];
{
isa = [GSCString class];
}
#ifndef NDEBUG
GSDebugAllocationAdd(isa, self);
#endif
return self;
}