From f2cfd895c477a605fab615b5d13e188b95465c95 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 30 Mar 2016 01:27:03 +0000 Subject: [PATCH] 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 --- rational.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/rational.c b/rational.c index 2359f0e3b5..65902cd7d9 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))