backport keyed archiving fix

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/branches/base-1_13_0@24274 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2006-12-27 17:25:52 +00:00
parent 0b5dd6729b
commit 6211b40e29
2 changed files with 23 additions and 0 deletions

View file

@ -1,3 +1,7 @@
2006-12-27 Richard Frith-Macdonald <rfm@gnu.org>
* Source/GSString.m: backport keyed archiving fix.
2006-11-25 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSCalendarDate.m: backport buffer overflow fixups from trunk.

View file

@ -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 "GSFormat.h"
#include <limits.h>
@ -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)
{
@ -3598,6 +3611,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)
{