Skip to content

Commit

Permalink
Fix mixed declarations and code
Browse files Browse the repository at this point in the history
This still support ruby 2.6 which does not require C99.
  • Loading branch information
nobu committed Nov 29, 2024
1 parent 291b40f commit 61d8497
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions ext/date/date_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -8954,9 +8954,10 @@ date_to_time(VALUE self)
get_d1a(self);

if (m_julian_p(adat)) {
self = d_lite_gregorian(self);
get_d1b(self);
VALUE g = d_lite_gregorian(self);
get_d1b(g);
adat = bdat;
self = g;
}

t = f_local3(rb_cTime,
Expand Down Expand Up @@ -9034,9 +9035,10 @@ datetime_to_time(VALUE self)
get_d1(self);

if (m_julian_p(dat)) {
self = d_lite_gregorian(self);
get_d1a(self);
VALUE g = d_lite_gregorian(self);
get_d1a(g);
dat = adat;
self = g;
}

{
Expand Down

0 comments on commit 61d8497

Please sign in to comment.