mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Update for new Archiver classes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@937 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1a94372e18
commit
b1846891f9
1 changed files with 3 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
/* A demonstration of writing and reading with NSArchiver */
|
||||
|
||||
#if 0
|
||||
#if 1
|
||||
|
||||
#include <Foundation/NSArchiver.h>
|
||||
#include <Foundation/NSString.h>
|
||||
|
@ -126,7 +126,7 @@ int main()
|
|||
/* Write it to a file */
|
||||
{
|
||||
id d = [[NSMutableData alloc] init];
|
||||
id a = [[Coder alloc] initForWritingWithMutableData: d];
|
||||
id a = [[Archiver alloc] initForWritingWithMutableData: d];
|
||||
|
||||
[a startEncodingInterconnectedObjects];
|
||||
[a encodeObject: r1 withName:@"one"];
|
||||
|
@ -147,7 +147,7 @@ int main()
|
|||
printf("\nReading:\n");
|
||||
{
|
||||
id d;
|
||||
id a = [Coder newReadingFromFile:@"./nsarchiver.dat"];
|
||||
id a = [Unarchiver newReadingFromFile:@"./nsarchiver.dat"];
|
||||
|
||||
[a startDecodingInterconnectedObjects];
|
||||
[a decodeObjectAt: &r1 withName:&d];
|
||||
|
|
Loading…
Reference in a new issue