discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: using NSKeyedArchiver ...


From: Richard Frith-Macdonald
Subject: Re: using NSKeyedArchiver ...
Date: Wed, 27 Dec 2006 17:29:10 +0000


On 27 Dec 2006, at 14:41, Paddy Smith wrote:

the following code 'seems to work' on macosx, but not on the gnustep
in debian etch.
Am I doing something silly ?

int main (int argc, const char * argv[]) {
       NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

       NSMutableString *foo;
       foo=[[NSMutableString alloc] init];
       [foo setString: @"wib"];
       NSLog(@"check: %08x: %@", foo, foo);

       NSData *bar;
       bar=[NSKeyedArchiver archivedDataWithRootObject:foo];

       NSMutableString *baz;
       baz=[NSKeyedUnarchiver unarchiveObjectWithData:bar];
       NSLog(@"check: %08x: %@", baz, baz);

       [pool release];
       return 0;
}


You are not doing anything silly ... you found a bug.

This is now fixed in the subversion repository, and you can get the fix by checking out the stable branch of the base library ...

svn co svn://svn.gna.org/viewcvs/gnustep/libs/base/branches/base-1_13_0/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]