Minor fixes and tidyups

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@7710 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
richard 2000-10-05 15:17:18 +00:00
parent 886aa9fc59
commit 05fbf4a225
4 changed files with 90 additions and 34 deletions

View file

@ -179,23 +179,19 @@
length: (unsigned int)length
freeWhenDone: (BOOL)flag
{
self = [super init];
if (self != nil)
_count = length;
_contents_chars = chars;
if (flag == YES && chars != 0)
{
_count = length;
_contents_chars = chars;
if (flag == YES && chars != 0)
{
#if GS_WITH_GC
_zone = GSAtomicMallocZone();
_zone = GSAtomicMallocZone();
#else
_zone = NSZoneFromPointer(chars);
_zone = NSZoneFromPointer(chars);
#endif
}
else
{
_zone = 0;
}
}
else
{
_zone = 0;
}
return self;
}
@ -663,24 +659,20 @@ stringDecrementCountAndFillHoleAt(NSGMutableStringStruct *self,
length: (unsigned int)length
freeWhenDone: (BOOL)flag
{
self = [super init];
if (self != nil)
_count = length;
_capacity = length;
_contents_chars = chars;
if (flag == YES && chars != 0)
{
_count = length;
_capacity = length;
_contents_chars = chars;
if (flag == YES && chars != 0)
{
#if GS_WITH_GC
_zone = GSAtomicMallocZone();
_zone = GSAtomicMallocZone();
#else
_zone = NSZoneFromPointer(chars);
_zone = NSZoneFromPointer(chars);
#endif
}
else
{
_zone = 0;
}
}
else
{
_zone = 0;
}
return self;
}