c649282
From 055613fd868a8c94e43893f8c58a00cdd2a81f6d Mon Sep 17 00:00:00 2001
c649282
From: Nobuyoshi Nakada <nobu@ruby-lang.org>
c649282
Date: Fri, 22 Mar 2024 18:18:35 +0900
c649282
Subject: [PATCH] Fix pointer incompatiblity
c649282
c649282
Since the subsecond part is discarded, WIDEVAL to VALUE conversion is
c649282
needed.
c649282
---
c649282
 time.c | 2 +-
c649282
 1 file changed, 1 insertion(+), 1 deletion(-)
c649282
c649282
diff --git a/time.c b/time.c
c649282
index 6179b081c02fc9..3304b2f4f4856a 100644
c649282
--- a/time.c
c649282
+++ b/time.c
ff5301a
@@ -2342,7 +2342,7 @@ zone_timelocal(VALUE zone, VALUE time)
c649282
     struct time_object *tobj = RTYPEDDATA_GET_DATA(time);
c649282
     wideval_t t, s;
c649282
 
c649282
-    split_second(tobj->timew, &t, &s);
c649282
+    wdivmod(tobj->timew, WINT2FIXWV(TIME_SCALE), &t, &s);
c649282
     tm = tm_from_time(rb_cTimeTM, time);
c649282
     utc = rb_check_funcall(zone, id_local_to_utc, 1, &tm;;
c649282
     if (UNDEF_P(utc)) return 0;