From 5bd9bdbc5c501ae48a148d1383260318ecc2e26d Mon Sep 17 00:00:00 2001 From: Alexander Malmberg Date: Sun, 2 Nov 2003 00:56:07 +0000 Subject: [PATCH] ([GSCSubString -copy]): Add as a stopgap workaround for problemes uncovered by the previous change. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@18022 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 5 +++++ Source/GSString.m | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ffbeaa831..f8b928b3c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-11-02 01:53 Alexander Malmberg + + * Source/GSString.m ([GSCSubString -copy]): Add as a stopgap + workaround for problems uncovered by the previous change. + Sat Nov 01 11:10:00 2003 Richard Frith-Macdonald * Source/NSString.m: ([-copyWithZone:]) always do true copy diff --git a/Source/GSString.m b/Source/GSString.m index face896c1..cc8cc4c78 100644 --- a/Source/GSString.m +++ b/Source/GSString.m @@ -2211,7 +2211,7 @@ transmute(ivars self, NSString *aString) obj = [obj initWithCString: _contents.c length: _count]; return obj; } - else + else { return RETAIN(self); } @@ -2232,6 +2232,10 @@ transmute(ivars self, NSString *aString) /* * Assume that a copy should be a new string, never just a retained substring. */ +- (id) copy +{ + return [self copyWithZone: NSDefaultMallocZone()]; +} - (id) copyWithZone: (NSZone*)z { NSString *obj;