diff --git a/ChangeLog b/ChangeLog index e621fa6ca..31f4a050e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-12-27 Richard Frith-Macdonald + + * Source/GSString.m: Fix keyed archiving error. + 2006-12-27 Chris B. Vetter * Headers/Foundation/NSNetServices.h: New class diff --git a/Source/GSString.m b/Source/GSString.m index 794c371e4..75ce6b819 100644 --- a/Source/GSString.m +++ b/Source/GSString.m @@ -46,6 +46,7 @@ #include "Foundation/NSValue.h" #include "Foundation/NSDebug.h" #include "Foundation/NSObjCRuntime.h" +#include "Foundation/NSKeyedArchiver.h" #include "GNUstepBase/GSObjCRuntime.h" #include @@ -2843,6 +2844,12 @@ transmute(GSStr self, NSString *aString) - (void) encodeWithCoder: (NSCoder*)aCoder { + if ([aCoder allowsKeyedCoding]) + { + [(NSKeyedArchiver*)aCoder _encodePropertyList: self forKey: @"NS.string"]; + return; + } + [aCoder encodeValueOfObjCType: @encode(unsigned) at: &_count]; if (_count > 0) { @@ -3149,6 +3156,12 @@ agree, create a new GSCInlineString otherwise. - (void) encodeWithCoder: (NSCoder*)aCoder { + if ([aCoder allowsKeyedCoding]) + { + [(NSKeyedArchiver*)aCoder _encodePropertyList: self forKey: @"NS.string"]; + return; + } + [aCoder encodeValueOfObjCType: @encode(unsigned) at: &_count]; if (_count > 0) { @@ -3599,6 +3612,12 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException); - (void) encodeWithCoder: (NSCoder*)aCoder { + if ([aCoder allowsKeyedCoding]) + { + [(NSKeyedArchiver*)aCoder _encodePropertyList: self forKey: @"NS.string"]; + return; + } + [aCoder encodeValueOfObjCType: @encode(unsigned) at: &_count]; if (_count > 0) {