mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
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:
parent
bbc86d4f31
commit
e30ebe3149
1 changed files with 12 additions and 6 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue