NSString rewrite/reorganisation

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@7769 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
richard 2000-10-09 04:41:18 +00:00
parent 9882ff6686
commit b1d5d768fb
21 changed files with 451 additions and 438 deletions

View file

@ -101,7 +101,7 @@
- (unsigned) hash
{
if (_hash == 0)
_hash = _fastImp._NSString_hash(self, @selector(hash));
_hash = [super hash];
return _hash;
}
@ -127,10 +127,8 @@
* First see if the has is the same - if not, we can't be equal.
*/
if (_hash == 0)
_hash = _fastImp._NSString_hash(self, @selector(hash));
if (other->_hash == 0)
other->_hash = _fastImp._NSString_hash(other, @selector(hash));
if (_hash != other->_hash)
_hash = [super hash];
if (_hash != [other hash])
return NO;
/*
@ -163,8 +161,7 @@
}
else if (fastClassIsKindOfClass(c, _fastCls._NSString))
{
return _fastImp._NSString_isEqualToString_(self,
@selector(isEqualToString:), anObject);
return [super isEqualToString: anObject];
}
else
{