mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
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:
parent
0b5dd6729b
commit
6211b40e29
2 changed files with 23 additions and 0 deletions
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue