summaryrefslogtreecommitdiff
path: root/ext/date
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-11 04:30:31 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-11 04:30:31 +0000
commit73400c01f76a312c01e6911059571143ce61d2d0 (patch)
treeb22b384b6384004814998f76b97d3980606f1560 /ext/date
parenteec23088e4d4ee2717bb615417d225312a483381 (diff)
date_core.c: reorder ComplexDateData
* ext/date/date_core.c (ComplexDateData): reordered to adjust common part with SimpleDateData. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/date')
-rw-r--r--ext/date/date_core.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/ext/date/date_core.c b/ext/date/date_core.c
index 5a7eb385c9..a529df9c1b 100644
--- a/ext/date/date_core.c
+++ b/ext/date/date_core.c
@@ -239,11 +239,8 @@ f_negative_p(VALUE x)
struct SimpleDateData
{
unsigned flags;
- VALUE nth; /* not always canonicalized */
int jd; /* as utc */
- /* df is zero */
- /* sf is zero */
- /* of is zero */
+ VALUE nth; /* not always canonicalized */
date_sg_t sg; /* 2298874..2426355 or -/+oo -- at most 22 bits */
/* decoded as utc=local */
int year; /* truncated */
@@ -262,11 +259,8 @@ struct SimpleDateData
struct ComplexDateData
{
unsigned flags;
- VALUE nth; /* not always canonicalized */
int jd; /* as utc */
- int df; /* as utc, in secs */
- VALUE sf; /* in nano secs */
- int of; /* in secs */
+ VALUE nth; /* not always canonicalized */
date_sg_t sg; /* 2298874..2426355 or -/+oo -- at most 22 bits */
/* decoded as local */
int year; /* truncated */
@@ -280,6 +274,9 @@ struct ComplexDateData
/* packed civil */
unsigned pc;
#endif
+ int df; /* as utc, in secs */
+ int of; /* in secs */
+ VALUE sf; /* in nano secs */
};
union DateData {