diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2016-11-22 17:45:07 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2016-11-22 17:45:07 +0900 |
| commit | 81122950317117f21b858294fa56d0d1e37436fe (patch) | |
| tree | eb5cd1243a8ec68f18f236e68e9271806148f151 | |
| parent | 740bf09740388b09714b5cdf70d9eec61d6cf4bd (diff) | |
| download | mruby-81122950317117f21b858294fa56d0d1e37436fe.tar.gz mruby-81122950317117f21b858294fa56d0d1e37436fe.zip | |
Removed fix_shift_get_width()
Fixnum is usually big enough for shift width.
| -rw-r--r-- | src/numeric.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/numeric.c b/src/numeric.c index 62ad3dde8..7779cd652 100644 --- a/src/numeric.c +++ b/src/numeric.c @@ -921,15 +921,6 @@ rshift(mrb_int val, mrb_int width) return mrb_fixnum_value(val >> width); } -static inline void -fix_shift_get_width(mrb_state *mrb, mrb_int *width) -{ - mrb_value y; - - mrb_get_args(mrb, "o", &y); - *width = mrb_fixnum(bit_coerce(mrb, y)); -} - /* 15.2.8.3.12 */ /* * call-seq: @@ -943,8 +934,7 @@ fix_lshift(mrb_state *mrb, mrb_value x) { mrb_int width, val; - fix_shift_get_width(mrb, &width); - + mrb_get_args(mrb, "i", &width); if (width == 0) { return x; } @@ -968,8 +958,7 @@ fix_rshift(mrb_state *mrb, mrb_value x) { mrb_int width, val; - fix_shift_get_width(mrb, &width); - + mrb_get_args(mrb, "i", &width); if (width == 0) { return x; } |
