mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-12 09:01:05 +00:00
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:
parent
ae04fdffe6
commit
cac753d5df
1 changed files with 9 additions and 27 deletions
|
@ -2811,6 +2811,15 @@ transmute(GSStr self, NSString *aString)
|
||||||
setup();
|
setup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSUInteger) hash
|
||||||
|
{
|
||||||
|
if (self->_flags.hash == 0)
|
||||||
|
{
|
||||||
|
self->_flags.hash = (*hashImp)((id)self, hashSel);
|
||||||
|
}
|
||||||
|
return self->_flags.hash;
|
||||||
|
}
|
||||||
|
|
||||||
- (id) initWithBytes: (const void*)chars
|
- (id) initWithBytes: (const void*)chars
|
||||||
length: (NSUInteger)length
|
length: (NSUInteger)length
|
||||||
encoding: (NSStringEncoding)encoding
|
encoding: (NSStringEncoding)encoding
|
||||||
|
@ -3034,15 +3043,6 @@ transmute(GSStr self, NSString *aString)
|
||||||
getCString_c((GSStr)self, buffer, maxLength, aRange, leftoverRange);
|
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
|
- (NSInteger) intValue
|
||||||
{
|
{
|
||||||
return intValue_c((GSStr)self);
|
return intValue_c((GSStr)self);
|
||||||
|
@ -3361,15 +3361,6 @@ agree, create a new GSCInlineString otherwise.
|
||||||
getCString_u((GSStr)self, buffer, maxLength, aRange, leftoverRange);
|
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
|
- (NSInteger) intValue
|
||||||
{
|
{
|
||||||
return intValue_u((GSStr)self);
|
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
|
- (id) init
|
||||||
{
|
{
|
||||||
return [self initWithCapacity: 0];
|
return [self initWithCapacity: 0];
|
||||||
|
|
Loading…
Reference in a new issue