summaryrefslogtreecommitdiff
path: root/rational.c
diff options
context:
space:
mode:
authorKenta Murata <mrkn@mrkn.jp>2020-01-17 09:05:17 +0900
committerKenta Murata <mrkn@mrkn.jp>2020-01-17 10:04:19 +0900
commit019a0ed0c78ccd0eb694d09c6a226761261ec15d (patch)
tree9bb9e987f3b9fb207e89ccd8bd9c4b37c9829e91 /rational.c
parent8ab11096ef3e0cf594308da285af2257cb4f5291 (diff)
Make RATIONAL_SET_{NUM,DEN} static inline functions
Diffstat (limited to 'rational.c')
-rw-r--r--rational.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/rational.c b/rational.c
index 8b4a394..4ae872b 100644
--- a/rational.c
+++ b/rational.c
@@ -403,8 +403,8 @@ nurat_s_new_internal(VALUE klass, VALUE num, VALUE den)
{
NEWOBJ_OF(obj, struct RRational, klass, T_RATIONAL | (RGENGC_WB_PROTECTED_RATIONAL ? FL_WB_PROTECTED : 0));
- RRATIONAL_SET_NUM(obj, num);
- RRATIONAL_SET_DEN(obj, den);
+ RATIONAL_SET_NUM((VALUE)obj, num);
+ RATIONAL_SET_DEN((VALUE)obj, den);
OBJ_FREEZE_RAW(obj);
return (VALUE)obj;
@@ -1836,8 +1836,8 @@ nurat_loader(VALUE self, VALUE a)
nurat_int_check(num);
nurat_int_check(den);
nurat_canonicalize(&num, &den);
- RRATIONAL_SET_NUM(dat, num);
- RRATIONAL_SET_DEN(dat, den);
+ RATIONAL_SET_NUM((VALUE)dat, num);
+ RATIONAL_SET_DEN((VALUE)dat, den);
OBJ_FREEZE_RAW(self);
return self;