Fix the build on platforms without tiny string support.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35447 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
David Chisnall 2012-08-25 12:31:41 +00:00
parent bbc86d4f31
commit e30ebe3149

View file

@ -867,6 +867,12 @@ createTinyString(const char *str, int length)
__sync_fetch_and_add(&tinyStrings, 1);
return (id)s;
}
#else
static id
createTinyString(const char *str, int length)
{
return nil;
}
#endif
/*
* The GSPlaceholderString class is used by the abstract cluster root
@ -3740,7 +3746,7 @@ agree, create a new GSCInlineString otherwise.
- (NSString*) substringFromRange: (NSRange)aRange
{
if (useTinyStrings && !_flags.wide)
if (!_flags.wide)
{
id tinyString = createTinyString((char*)_contents.c + aRange.location, aRange.length);
@ -3764,7 +3770,7 @@ agree, create a new GSCInlineString otherwise.
GS_RANGE_CHECK(aRange, _count);
return substring_c((GSStr)self, aRange);
}
if (useTinyStrings && !_flags.wide)
if (!_flags.wide)
{
id tinyString = createTinyString((char*)_contents.c + aRange.location, aRange.length);
@ -4075,7 +4081,7 @@ agree, create a new GSCInlineString otherwise.
- (NSString*) substringFromRange: (NSRange)aRange
{
if (useTinyStrings && !_flags.wide)
if (!_flags.wide)
{
id tinyString = createTinyString((char*)_contents.c + aRange.location, aRange.length);
@ -4094,7 +4100,7 @@ agree, create a new GSCInlineString otherwise.
- (NSString*) substringWithRange: (NSRange)aRange
{
if (useTinyStrings && !_flags.wide)
if (!_flags.wide)
{
id tinyString = createTinyString((char*)_contents.c + aRange.location, aRange.length);
@ -5107,7 +5113,7 @@ NSAssert(_flags.owned == 1 && _zone != 0, NSInternalInconsistencyException);
aRange.length * sizeof(unichar));
return o;
}
else if (useTinyStrings)
else
{
id tinyString = createTinyString((char*)_contents.c + aRange.location, aRange.length);
@ -5142,7 +5148,7 @@ NSAssert(_flags.owned == 1 && _zone != 0, NSInternalInconsistencyException);
aRange.length * sizeof(unichar));
return o;
}
else if (useTinyStrings)
else
{
id tinyString = createTinyString((char*)_contents.c + aRange.location, aRange.length);