1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
From 59254caff0f39c87370d0c11793e3aae5c38d6e1 Mon Sep 17 00:00:00 2001
From: nagachika <nagachika@ruby-lang.org>
Date: Sun, 15 Dec 2024 15:31:58 +0900
Subject: [PATCH] merge revision(s) 055613fd868a8c94e43893f8c58a00cdd2a81f6d:
[Backport #20447]
Fix pointer incompatiblity
Since the subsecond part is discarded, WIDEVAL to VALUE conversion is
needed.
---
time.c | 2 +-
version.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/time.c b/time.c
index 7f859d5eb40acc..04f6f2afc5f28c 100644
--- a/time.c
+++ b/time.c
@@ -2322,7 +2322,7 @@ zone_timelocal(VALUE zone, VALUE time)
struct time_object *tobj = DATA_PTR(time);
wideval_t t, s;
- split_second(tobj->timew, &t, &s);
+ wdivmod(tobj->timew, WINT2FIXWV(TIME_SCALE), &t, &s);
tm = tm_from_time(rb_cTimeTM, time);
utc = rb_check_funcall(zone, id_local_to_utc, 1, &tm);
if (UNDEF_P(utc)) return 0;
|