mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Corrected keyed decoding.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@18496 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
412c677079
commit
029db20b84
2 changed files with 10 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
|||
2004-01-28 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSString.m:
|
||||
Corrected keyed decoding and implemented keyed encoding.
|
||||
|
||||
2004-01-28 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSKeyedUnrchiver.m: Store objects in map while they are
|
||||
|
|
|
@ -66,6 +66,8 @@
|
|||
#include "Foundation/NSLock.h"
|
||||
#include "Foundation/NSUserDefaults.h"
|
||||
#include "Foundation/NSDebug.h"
|
||||
// For private method _decodePropertyListForKey:
|
||||
#include "Foundation/NSKeyedArchiver.h"
|
||||
#include "GNUstepBase/GSMime.h"
|
||||
#include "GSFormat.h"
|
||||
#include <limits.h>
|
||||
|
@ -3861,10 +3863,7 @@ handle_printf_atsign (FILE *stream,
|
|||
{
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
// FIXME
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"%@ doesn't know how to encode with keyed coder",
|
||||
NSStringFromClass([self class])];
|
||||
[(NSKeyedArchiver*)aCoder _encodePropertyList: self forKey: @"NS.string"];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -3892,7 +3891,8 @@ handle_printf_atsign (FILE *stream,
|
|||
{
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
NSString *string = [aCoder decodeObjectForKey: @"NS.string"];
|
||||
NSString *string = (NSString*)[(NSKeyedUnarchiver*)aCoder
|
||||
_decodePropertyListForKey: @"NS.string"];
|
||||
|
||||
self = [self initWithString: string];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue