Merge 0.6.6 branch into main.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@7187 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2000-08-07 22:00:31 +00:00
parent a6a395487a
commit 7b0f402b1c
71 changed files with 4888 additions and 5571 deletions

View file

@ -1332,16 +1332,31 @@ static BOOL deallocNotifications = NO;
double_release_check_enabled = enable;
}
- (int) compare: (id)anotherObject;
- (int) compare: (id)anotherObject
{
if ([self isEqual:anotherObject])
return 0;
if (anotherObject == self)
{
return NSOrderedSame;
}
if (anotherObject == nil)
{
[NSException raise: NSInvalidArgumentException
format: @"nil argument for compare:"];
}
if ([self isEqual: anotherObject])
{
return NSOrderedSame;
}
// Ordering objects by their address is pretty useless,
// so subclasses should override this is some useful way.
else if (self > anotherObject)
return 1;
if (self > anotherObject)
{
return NSOrderedDescending;
}
else
return -1;
{
return NSOrderedAscending;
}
}
- (BOOL) isMetaClass