mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
eec23088e4
commit
73400c01f7
1 changed files with 5 additions and 8 deletions
|
@ -239,11 +239,8 @@ f_negative_p(VALUE x)
|
||||||
struct SimpleDateData
|
struct SimpleDateData
|
||||||
{
|
{
|
||||||
unsigned flags;
|
unsigned flags;
|
||||||
VALUE nth; /* not always canonicalized */
|
|
||||||
int jd; /* as utc */
|
int jd; /* as utc */
|
||||||
/* df is zero */
|
VALUE nth; /* not always canonicalized */
|
||||||
/* sf is zero */
|
|
||||||
/* of is zero */
|
|
||||||
date_sg_t sg; /* 2298874..2426355 or -/+oo -- at most 22 bits */
|
date_sg_t sg; /* 2298874..2426355 or -/+oo -- at most 22 bits */
|
||||||
/* decoded as utc=local */
|
/* decoded as utc=local */
|
||||||
int year; /* truncated */
|
int year; /* truncated */
|
||||||
|
@ -262,11 +259,8 @@ struct SimpleDateData
|
||||||
struct ComplexDateData
|
struct ComplexDateData
|
||||||
{
|
{
|
||||||
unsigned flags;
|
unsigned flags;
|
||||||
VALUE nth; /* not always canonicalized */
|
|
||||||
int jd; /* as utc */
|
int jd; /* as utc */
|
||||||
int df; /* as utc, in secs */
|
VALUE nth; /* not always canonicalized */
|
||||||
VALUE sf; /* in nano secs */
|
|
||||||
int of; /* in secs */
|
|
||||||
date_sg_t sg; /* 2298874..2426355 or -/+oo -- at most 22 bits */
|
date_sg_t sg; /* 2298874..2426355 or -/+oo -- at most 22 bits */
|
||||||
/* decoded as local */
|
/* decoded as local */
|
||||||
int year; /* truncated */
|
int year; /* truncated */
|
||||||
|
@ -280,6 +274,9 @@ struct ComplexDateData
|
||||||
/* packed civil */
|
/* packed civil */
|
||||||
unsigned pc;
|
unsigned pc;
|
||||||
#endif
|
#endif
|
||||||
|
int df; /* as utc, in secs */
|
||||||
|
int of; /* in secs */
|
||||||
|
VALUE sf; /* in nano secs */
|
||||||
};
|
};
|
||||||
|
|
||||||
union DateData {
|
union DateData {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue