Masses of fixes

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@5474 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
richard 1999-12-13 12:14:01 +00:00
parent b35bbfad7e
commit 22f09ca318
8 changed files with 666 additions and 483 deletions

View file

@ -898,13 +898,10 @@ static NSString *indentStrings[] = {
if (o == anObject)
{
if (rem == 0)
rem = [self methodForSelector: remSel];
{
rem = [self methodForSelector: remSel];
}
(*rem)(self, remSel, i);
/*
* Bail out now or run the risk of comparing against a garbage
* pointer.
*/
return;
}
}
}
@ -942,15 +939,24 @@ static NSString *indentStrings[] = {
if (o == anObject || (*eq)(anObject, eqSel, o) == YES)
{
if (rem == 0)
rem = [self methodForSelector: remSel];
{
rem = [self methodForSelector: remSel];
/*
* We need to retain the object so that when we remove the
* first equal object we don't get left with a bad object
* pointer for later comparisons.
*/
RETAIN(anObject);
}
(*rem)(self, remSel, i);
/*
* Bail out now or run the risk of comparing against a garbage
* pointer.
*/
return;
}
}
#ifndef GS_WITH_GC
if (rem != 0)
{
RELEASE(anObject);
}
#endif
}
}
@ -984,13 +990,10 @@ static NSString *indentStrings[] = {
if (o == anObject)
{
if (rem == 0)
rem = [self methodForSelector: remSel];
{
rem = [self methodForSelector: remSel];
}
(*rem)(self, remSel, i);
/*
* Bail out now or run the risk of comparing against a garbage
* pointer.
*/
return;
}
}
}
@ -1020,15 +1023,24 @@ static NSString *indentStrings[] = {
if (o == anObject || (*eq)(anObject, eqSel, o) == YES)
{
if (rem == 0)
rem = [self methodForSelector: remSel];
{
rem = [self methodForSelector: remSel];
/*
* We need to retain the object so that when we remove the
* first equal object we don't get left with a bad object
* pointer for later comparisons.
*/
RETAIN(anObject);
}
(*rem)(self, remSel, i);
/*
* Bail out now or run the risk of comparing against a garbage
* pointer.
*/
return;
}
}
#ifndef GS_WITH_GC
if (rem != 0)
{
RELEASE(anObject);
}
#endif
}
}
@ -1041,7 +1053,9 @@ static NSString *indentStrings[] = {
IMP remLast = [self methodForSelector: rlSel];
while (c--)
(*remLast)(self, rlSel);
{
(*remLast)(self, rlSel);
}
}
}
@ -1149,7 +1163,9 @@ static NSString *indentStrings[] = {
IMP rem = [self methodForSelector: remSel];
while (i-- > s)
(*rem)(self, remSel, i);
{
(*rem)(self, remSel, i);
}
}
}