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 /mrbgems/mruby-struct | |
| 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 'mrbgems/mruby-struct')
| -rw-r--r-- | mrbgems/mruby-struct/src/struct.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mrbgems/mruby-struct/src/struct.c b/mrbgems/mruby-struct/src/struct.c index 54afefd74..df76d7a33 100644 --- a/mrbgems/mruby-struct/src/struct.c +++ b/mrbgems/mruby-struct/src/struct.c @@ -435,7 +435,7 @@ mrb_struct_aref(mrb_state *mrb, mrb_value s) if (mrb_symbol_p(idx)) { return struct_aref_sym(mrb, s, mrb_symbol(idx)); } - return struct_aref_int(mrb, s, mrb_int(mrb, idx)); + return struct_aref_int(mrb, s, mrb_as_int(mrb, idx)); } static mrb_value @@ -499,7 +499,7 @@ mrb_struct_aset(mrb_state *mrb, mrb_value s) return mrb_struct_aset_sym(mrb, s, mrb_symbol(idx), val); } - i = mrb_int(mrb, idx); + i = mrb_as_int(mrb, idx); if (i < 0) i = RSTRUCT_LEN(s) + i; if (i < 0) { mrb_raisef(mrb, E_INDEX_ERROR, |
