1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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) \
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))