mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
pass dates and time zones bycopy
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@8955 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
39cfacf0f6
commit
2cf148585f
3 changed files with 19 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
|||
2001-01-31 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSDate.m: pass dates over DO bycopy unless explicitly byref.
|
||||
* Source/NSTimeZone.m: pass time zones over DO bycopy unless
|
||||
explicitly byref.
|
||||
|
||||
2001-01-30 Michael Hanni <mhanni@sprintmail.com>
|
||||
|
||||
* Source/.cvsignore: tweaked to cover a few more items.
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include <Foundation/NSCharacterSet.h>
|
||||
#include <Foundation/NSScanner.h>
|
||||
#include <Foundation/NSObjCRuntime.h>
|
||||
#include <Foundation/NSPortCoder.h>
|
||||
#include <base/preface.h>
|
||||
#include <base/behavior.h>
|
||||
#if HAVE_SYS_TIME_H
|
||||
|
@ -880,11 +881,11 @@ GSTimeNow()
|
|||
return abstractClass;
|
||||
}
|
||||
|
||||
- (id) replacementObjectForPortCoder: (NSPortCoder*)aRmc
|
||||
- (id) replacementObjectForPortCoder: (NSPortCoder*)aCoder
|
||||
{
|
||||
/* Make sure that Connection's always send us bycopy,
|
||||
i.e. as our own class, not a Proxy class. */
|
||||
return self;
|
||||
if ([aCoder isByref] == NO)
|
||||
return self;
|
||||
return [super replacementObjectForPortCoder: aCoder];
|
||||
}
|
||||
|
||||
- (void) encodeWithCoder: (NSCoder*)coder
|
||||
|
|
|
@ -63,6 +63,7 @@
|
|||
#include <Foundation/NSMapTable.h>
|
||||
#include <Foundation/NSThread.h>
|
||||
#include <Foundation/NSNotification.h>
|
||||
#include <Foundation/NSPortCoder.h>
|
||||
|
||||
#define NOID
|
||||
#include "tzfile.h"
|
||||
|
@ -1109,6 +1110,13 @@ static NSMapTable *absolutes = 0;
|
|||
return [self subclassResponsibility: _cmd];
|
||||
}
|
||||
|
||||
- (id) replacementObjectForPortCoder: (NSPortCoder*)aCoder
|
||||
{
|
||||
if ([aCoder isByref] == NO)
|
||||
return self;
|
||||
return [super replacementObjectForPortCoder: aCoder];
|
||||
}
|
||||
|
||||
- (int) secondsFromGMT
|
||||
{
|
||||
return [self secondsFromGMTForDate: [NSDate date]];
|
||||
|
|
Loading…
Reference in a new issue