Extract NUM2WV
macro
This commit is contained in:
parent
9f924e2f13
commit
70f5c62af1
Notes:
git
2024-12-14 10:27:50 +00:00
6
time.c
6
time.c
@ -336,6 +336,8 @@ v2w(VALUE v)
|
||||
return WIDEVAL_WRAP(v);
|
||||
}
|
||||
|
||||
#define NUM2WV(v) v2w(rb_Integer(v))
|
||||
|
||||
static int
|
||||
weq(wideval_t wx, wideval_t wy)
|
||||
{
|
||||
@ -2278,7 +2280,7 @@ extract_time(VALUE time)
|
||||
const ID id_to_i = idTo_i;
|
||||
|
||||
#define EXTRACT_TIME() do { \
|
||||
t = v2w(rb_Integer(AREF(to_i))); \
|
||||
t = NUM2WV(AREF(to_i)); \
|
||||
} while (0)
|
||||
|
||||
if (rb_typeddata_is_kind_of(time, &time_data_type)) {
|
||||
@ -2321,7 +2323,7 @@ extract_vtm(VALUE time, VALUE orig_time, struct time_object *orig_tobj, VALUE su
|
||||
vtm->sec = obj2subsecx(AREF(sec), &subsecx); \
|
||||
vtm->isdst = RTEST(AREF(isdst)); \
|
||||
vtm->utc_offset = Qnil; \
|
||||
t = v2w(rb_Integer(AREF(to_i))); \
|
||||
t = NUM2WV(AREF(to_i)); \
|
||||
} while (0)
|
||||
|
||||
if (rb_typeddata_is_kind_of(time, &time_data_type)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user