mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
compatibiulity fix for 35699
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34865 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
fc5be9646b
commit
a1748ffc60
2 changed files with 29 additions and 8 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2012-03-02 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/GSString.m: Compatribility fix ... copy strings implicitly
|
||||||
|
when taking a substring of a string whose buffer is not owned.
|
||||||
|
|
||||||
2012-03-02 Richard Frith-Macdonald <rfm@gnu.org>
|
2012-03-02 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Source/NSURLConnection.m: Compatibility fix for bug #35686
|
* Source/NSURLConnection.m: Compatibility fix for bug #35686
|
||||||
|
|
|
@ -3768,14 +3768,22 @@ agree, create a new GSCInlineString otherwise.
|
||||||
|
|
||||||
- (NSString*) substringFromRange: (NSRange)aRange
|
- (NSString*) substringFromRange: (NSRange)aRange
|
||||||
{
|
{
|
||||||
GS_RANGE_CHECK(aRange, _count);
|
if (_flags.owned)
|
||||||
return substring_c((GSStr)self, aRange);
|
{
|
||||||
|
GS_RANGE_CHECK(aRange, _count);
|
||||||
|
return substring_c((GSStr)self, aRange);
|
||||||
|
}
|
||||||
|
return [super substringWithRange: aRange];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString*) substringWithRange: (NSRange)aRange
|
- (NSString*) substringWithRange: (NSRange)aRange
|
||||||
{
|
{
|
||||||
GS_RANGE_CHECK(aRange, _count);
|
if (_flags.owned)
|
||||||
return substring_c((GSStr)self, aRange);
|
{
|
||||||
|
GS_RANGE_CHECK(aRange, _count);
|
||||||
|
return substring_c((GSStr)self, aRange);
|
||||||
|
}
|
||||||
|
return [super substringWithRange: aRange];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) uppercaseString
|
- (id) uppercaseString
|
||||||
|
@ -4106,14 +4114,22 @@ agree, create a new GSCInlineString otherwise.
|
||||||
|
|
||||||
- (NSString*) substringFromRange: (NSRange)aRange
|
- (NSString*) substringFromRange: (NSRange)aRange
|
||||||
{
|
{
|
||||||
GS_RANGE_CHECK(aRange, _count);
|
if (_flags.owned)
|
||||||
return substring_u((GSStr)self, aRange);
|
{
|
||||||
|
GS_RANGE_CHECK(aRange, _count);
|
||||||
|
return substring_u((GSStr)self, aRange);
|
||||||
|
}
|
||||||
|
return [super substringWithRange: aRange];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString*) substringWithRange: (NSRange)aRange
|
- (NSString*) substringWithRange: (NSRange)aRange
|
||||||
{
|
{
|
||||||
GS_RANGE_CHECK(aRange, _count);
|
if (_flags.owned)
|
||||||
return substring_u((GSStr)self, aRange);
|
{
|
||||||
|
GS_RANGE_CHECK(aRange, _count);
|
||||||
|
return substring_u((GSStr)self, aRange);
|
||||||
|
}
|
||||||
|
return [super substringWithRange: aRange];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) uppercaseString
|
- (id) uppercaseString
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue