mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
Source/GSString.m
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@12827 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
28181fd527
commit
382ed09b62
2 changed files with 10 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2002-02-27 Pierre-Yves Rivaille <pyrivail@ens-lyon.fr>
|
||||
|
||||
* Source/GSString.m ([GSMutableString -substringWithRange:]):
|
||||
create a new string which size is the range length, not the original
|
||||
string's length.
|
||||
|
||||
2002-02-27 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Tools/gdomap.c: Removed obsolete code for shrinking data structures.
|
||||
|
|
|
@ -2922,14 +2922,16 @@ transmute(ivars self, NSString *aString)
|
|||
if (_flags.wide == 1)
|
||||
{
|
||||
sub = (NSString*)NSAllocateObject(GSUnicodeInlineStringClass,
|
||||
_count*sizeof(unichar), NSDefaultMallocZone());
|
||||
(aRange.length)*sizeof(unichar),
|
||||
NSDefaultMallocZone());
|
||||
sub = [sub initWithCharacters: self->_contents.u + aRange.location
|
||||
length: aRange.length];
|
||||
}
|
||||
else
|
||||
{
|
||||
sub = (NSString*)NSAllocateObject(GSCInlineStringClass,
|
||||
_count, NSDefaultMallocZone());
|
||||
aRange.length,
|
||||
NSDefaultMallocZone());
|
||||
sub = [sub initWithCString: self->_contents.c + aRange.location
|
||||
length: aRange.length];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue