mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 08:41:03 +00:00
Memory leak and other fixes from Frith-MacDonald.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2775 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7285b3e9a6
commit
a0993c655f
17 changed files with 11155 additions and 10927 deletions
|
@ -327,14 +327,25 @@ decode (const void *ptr)
|
|||
- (void)encodeWithCoder: aCoder
|
||||
{
|
||||
[super encodeWithCoder: aCoder];
|
||||
[aCoder encodeObject: name];
|
||||
if (self == localTimeZone)
|
||||
[aCoder encodeObject: @"NSLocalTimeZone"];
|
||||
else
|
||||
[aCoder encodeObject: name];
|
||||
}
|
||||
|
||||
- (id) awakeAfterUsingCoder: aCoder
|
||||
{
|
||||
if ([name isEqual: @"NSLocalTimeZone"]) {
|
||||
return localTimeZone;
|
||||
}
|
||||
return [NSTimeZone timeZoneWithName: name];
|
||||
}
|
||||
|
||||
- initWithDecoder: aDecoder
|
||||
{
|
||||
/* FIXME?: is this right? */
|
||||
self = [super initWithCoder: aDecoder];
|
||||
return (self = (id)[NSTimeZone timeZoneWithName: [aDecoder decodeObject]]);
|
||||
name = [aDecoder decodeObject];
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSTimeZoneDetail*)timeZoneDetailForDate: (NSDate*)date
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue