summaryrefslogtreecommitdiffhomepage
path: root/src/vm.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2021-03-28 08:33:50 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2021-03-28 08:35:29 +0900
commita5244b02c5cd5031d59bc59e7182e69f00cbfade (patch)
tree118a0bfdb00a8e0bad051674500a6d9f564d6f6a /src/vm.c
parentc2f929ad0f9c4b98cd4b8027052cbb3af599f19b (diff)
downloadmruby-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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vm.c b/src/vm.c
index 1009fb638..bb1047a30 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -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;