mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-26 18:21:04 +00:00
add coding
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30857 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
9488e45dcb
commit
defe914b98
1 changed files with 7 additions and 10 deletions
|
@ -25,6 +25,7 @@
|
|||
#import "common.h"
|
||||
#import "Foundation/NSLocale.h"
|
||||
#import "Foundation/NSArray.h"
|
||||
#import "Foundation/NSCoder.h"
|
||||
#import "Foundation/NSDictionary.h"
|
||||
#import "Foundation/NSLock.h"
|
||||
#import "Foundation/NSUserDefaults.h"
|
||||
|
@ -569,25 +570,21 @@ static NSArray *_currencyCodesWithType (uint32_t currType)
|
|||
{
|
||||
RELEASE(_localeId);
|
||||
RELEASE(_components);
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
//
|
||||
// NSCoding
|
||||
//
|
||||
- (void) encodeWithCoder: (NSCoder *) encoder
|
||||
- (void) encodeWithCoder: (NSCoder*)encoder
|
||||
{
|
||||
[encoder encodeObject: _localeId];
|
||||
}
|
||||
|
||||
- (id) initWithCoder: (NSCoder *) decoder
|
||||
- (id) initWithCoder: (NSCoder*)decoder
|
||||
{
|
||||
return nil;
|
||||
NSString *s = [decoder decodeObject];
|
||||
|
||||
return [self initWithLocaleIdentifier: s];
|
||||
}
|
||||
|
||||
//
|
||||
// NSCopying
|
||||
//
|
||||
- (id) copyWithZone: (NSZone *) zone
|
||||
{
|
||||
return RETAIN(self);
|
||||
|
|
Loading…
Reference in a new issue