summaryrefslogtreecommitdiff
path: root/rational.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-30 01:27:03 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-30 01:27:03 (GMT)
commitf2cfd895c477a605fab615b5d13e188b95465c95 (patch)
tree1377c636a003e0820edd9c1406f54adfa7705360 /rational.c
parente79d163caf09dbeeb5197576b8e364448f3bbac0 (diff)
rational.c: pure declarations
* rational.c (get_dat1, get_dat2): turn into pure variable declarations only, not mixed code and declarations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'rational.c')
-rw-r--r--rational.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/rational.c b/rational.c
index 2359f0e..65902cd 100644
--- a/rational.c
+++ b/rational.c
@@ -395,13 +395,10 @@ f_lcm(VALUE x, VALUE y)
}
#define get_dat1(x) \
- struct RRational *dat;\
- dat = ((struct RRational *)(x))
+ struct RRational *dat = RRATIONAL(x)
#define get_dat2(x,y) \
- struct RRational *adat, *bdat;\
- adat = ((struct RRational *)(x));\
- bdat = ((struct RRational *)(y))
+ struct RRational *adat = RRATIONAL(x), *bdat = RRATIONAL(y)
#define RRATIONAL_SET_NUM(rat, n) RB_OBJ_WRITE((rat), &((struct RRational *)(rat))->num,(n))
#define RRATIONAL_SET_DEN(rat, d) RB_OBJ_WRITE((rat), &((struct RRational *)(rat))->den,(d))