Move hash implementation to GSString

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29096 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2009-12-04 09:52:14 +00:00
parent ae04fdffe6
commit cac753d5df

View file

@ -2811,6 +2811,15 @@ transmute(GSStr self, NSString *aString)
setup();
}
- (NSUInteger) hash
{
if (self->_flags.hash == 0)
{
self->_flags.hash = (*hashImp)((id)self, hashSel);
}
return self->_flags.hash;
}
- (id) initWithBytes: (const void*)chars
length: (NSUInteger)length
encoding: (NSStringEncoding)encoding
@ -3034,15 +3043,6 @@ transmute(GSStr self, NSString *aString)
getCString_c((GSStr)self, buffer, maxLength, aRange, leftoverRange);
}
- (NSUInteger) hash
{
if (self->_flags.hash == 0)
{
self->_flags.hash = (*hashImp)((id)self, hashSel);
}
return self->_flags.hash;
}
- (NSInteger) intValue
{
return intValue_c((GSStr)self);
@ -3361,15 +3361,6 @@ agree, create a new GSCInlineString otherwise.
getCString_u((GSStr)self, buffer, maxLength, aRange, leftoverRange);
}
- (NSUInteger) hash
{
if (self->_flags.hash == 0)
{
self->_flags.hash = (*hashImp)((id)self, hashSel);
}
return self->_flags.hash;
}
- (NSInteger) intValue
{
return intValue_u((GSStr)self);
@ -3874,15 +3865,6 @@ NSAssert(_flags.owned == 1 && _zone != 0, NSInternalInconsistencyException);
}
}
- (NSUInteger) hash
{
if (self->_flags.hash == 0)
{
self->_flags.hash = (*hashImp)((id)self, hashSel);
}
return self->_flags.hash;
}
- (id) init
{
return [self initWithCapacity: 0];