mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 09:02:01 +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
5893a40526
commit
f6b1f9e76a
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>
|
2004-01-28 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Source/NSKeyedUnrchiver.m: Store objects in map while they are
|
* Source/NSKeyedUnrchiver.m: Store objects in map while they are
|
||||||
|
|
|
@ -66,6 +66,8 @@
|
||||||
#include "Foundation/NSLock.h"
|
#include "Foundation/NSLock.h"
|
||||||
#include "Foundation/NSUserDefaults.h"
|
#include "Foundation/NSUserDefaults.h"
|
||||||
#include "Foundation/NSDebug.h"
|
#include "Foundation/NSDebug.h"
|
||||||
|
// For private method _decodePropertyListForKey:
|
||||||
|
#include "Foundation/NSKeyedArchiver.h"
|
||||||
#include "GNUstepBase/GSMime.h"
|
#include "GNUstepBase/GSMime.h"
|
||||||
#include "GSFormat.h"
|
#include "GSFormat.h"
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
@ -3861,10 +3863,7 @@ handle_printf_atsign (FILE *stream,
|
||||||
{
|
{
|
||||||
if ([aCoder allowsKeyedCoding])
|
if ([aCoder allowsKeyedCoding])
|
||||||
{
|
{
|
||||||
// FIXME
|
[(NSKeyedArchiver*)aCoder _encodePropertyList: self forKey: @"NS.string"];
|
||||||
[NSException raise: NSInvalidArgumentException
|
|
||||||
format: @"%@ doesn't know how to encode with keyed coder",
|
|
||||||
NSStringFromClass([self class])];
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -3892,7 +3891,8 @@ handle_printf_atsign (FILE *stream,
|
||||||
{
|
{
|
||||||
if ([aCoder allowsKeyedCoding])
|
if ([aCoder allowsKeyedCoding])
|
||||||
{
|
{
|
||||||
NSString *string = [aCoder decodeObjectForKey: @"NS.string"];
|
NSString *string = (NSString*)[(NSKeyedUnarchiver*)aCoder
|
||||||
|
_decodePropertyListForKey: @"NS.string"];
|
||||||
|
|
||||||
self = [self initWithString: string];
|
self = [self initWithString: string];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue