diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-05-17 15:07:05 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-05-17 15:07:05 +0900 |
| commit | 5eebbd7df23421235a2d6289784e18d572c4b18a (patch) | |
| tree | 1cdb8c607f175d162ca3e316a0147ee36b2fc015 /src/range.c | |
| parent | ea7f1953c3886d7597eaed21c84fdba209ee6d9b (diff) | |
| download | mruby-5eebbd7df23421235a2d6289784e18d572c4b18a.tar.gz mruby-5eebbd7df23421235a2d6289784e18d572c4b18a.zip | |
Global renaming regarding `integer` and `float`.
Consistent number conversion function names:
* `mrb_value` to immediate (C) value
* `mrb_int()` -> `mrb_as_int()`
* `mrb_to_flo()` -> `mrb_as_float()`
* `mrb_value` to `mrb_value` (converted)
* `mrb_to_int()'
* `mrb_Integer()` - removed
* `mrb_Float()` -> `mrb_to_float`
Consistent function name (avoid `_flo` suffix):
* `mrb_div_flo()` -> `mrb_div_float`
Diffstat (limited to 'src/range.c')
| -rw-r--r-- | src/range.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/range.c b/src/range.c index 1615f03b2..be611b2a3 100644 --- a/src/range.c +++ b/src/range.c @@ -458,8 +458,8 @@ mrb_range_beg_len(mrb_state *mrb, mrb_value range, mrb_int *begp, mrb_int *lenp, if (!mrb_range_p(range)) return MRB_RANGE_TYPE_MISMATCH; r = mrb_range_ptr(mrb, range); - beg = mrb_nil_p(RANGE_BEG(r)) ? 0 : mrb_int(mrb, RANGE_BEG(r)); - end = mrb_nil_p(RANGE_END(r)) ? -1 : mrb_int(mrb, RANGE_END(r)); + beg = mrb_nil_p(RANGE_BEG(r)) ? 0 : mrb_as_int(mrb, RANGE_BEG(r)); + end = mrb_nil_p(RANGE_END(r)) ? -1 : mrb_as_int(mrb, RANGE_END(r)); excl = mrb_nil_p(RANGE_END(r)) ? 0 : RANGE_EXCL(r); if (beg < 0) { |
