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
This commit is contained in:
nobu 2016-03-30 01:27:03 +00:00
parent e79d163caf
commit f2cfd895c4

View File

@ -395,13 +395,10 @@ f_lcm(VALUE x, VALUE y)
} }
#define get_dat1(x) \ #define get_dat1(x) \
struct RRational *dat;\ struct RRational *dat = RRATIONAL(x)
dat = ((struct RRational *)(x))
#define get_dat2(x,y) \ #define get_dat2(x,y) \
struct RRational *adat, *bdat;\ struct RRational *adat = RRATIONAL(x), *bdat = RRATIONAL(y)
adat = ((struct RRational *)(x));\
bdat = ((struct RRational *)(y))
#define RRATIONAL_SET_NUM(rat, n) RB_OBJ_WRITE((rat), &((struct RRational *)(rat))->num,(n)) #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)) #define RRATIONAL_SET_DEN(rat, d) RB_OBJ_WRITE((rat), &((struct RRational *)(rat))->den,(d))