diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-03-28 08:33:50 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-03-28 08:35:29 +0900 |
| commit | a5244b02c5cd5031d59bc59e7182e69f00cbfade (patch) | |
| tree | 118a0bfdb00a8e0bad051674500a6d9f564d6f6a /src/vm.c | |
| parent | c2f929ad0f9c4b98cd4b8027052cbb3af599f19b (diff) | |
| download | mruby-a5244b02c5cd5031d59bc59e7182e69f00cbfade.tar.gz mruby-a5244b02c5cd5031d59bc59e7182e69f00cbfade.zip | |
numeric.c: function renaming.
- `mrb_num_div_int(mrb,x,y)` -> `mrb_div_int(mrb,x,y)`
- `mrb_num_div_flo(mrb,x,y)` -> `mrb_div_flo(x,y)`
They are internal function not supposed to be used outside of the core.
Diffstat (limited to 'src/vm.c')
| -rw-r--r-- | src/vm.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1068,6 +1068,8 @@ check_target_class(mrb_state *mrb) } void mrb_hash_check_kdict(mrb_state *mrb, mrb_value self); +mrb_int mrb_div_int(mrb_state *mrb, mrb_int x, mrb_int y); +mrb_float mrb_div_flo(mrb_float x, mrb_float y); MRB_API mrb_value mrb_vm_exec(mrb_state *mrb, const struct RProc *proc, const mrb_code *pc) @@ -2364,9 +2366,7 @@ RETRY_TRY_BLOCK: } CASE(OP_DIV, B) { - mrb_int mrb_num_div_int(mrb_state *mrb, mrb_int x, mrb_int y); #ifndef MRB_NO_FLOAT - mrb_float mrb_num_div_flo(mrb_state *mrb, mrb_float x, mrb_float y); mrb_float x, y, f; #endif @@ -2376,7 +2376,7 @@ RETRY_TRY_BLOCK: { mrb_int x = mrb_integer(regs[a]); mrb_int y = mrb_integer(regs[a+1]); - mrb_int div = mrb_num_div_int(mrb, x, y); + mrb_int div = mrb_div_int(mrb, x, y); SET_INT_VALUE(mrb, regs[a], div); } NEXT; @@ -2401,7 +2401,7 @@ RETRY_TRY_BLOCK: } #ifndef MRB_NO_FLOAT - f = mrb_num_div_flo(mrb, x, y); + f = mrb_div_flo(x, y); SET_FLOAT_VALUE(mrb, regs[a], f); #endif NEXT; |
