mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
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:
parent
886aa9fc59
commit
05fbf4a225
4 changed files with 90 additions and 34 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue