Add new functions for numerical operation; ref 237a57b

New functions:
* mrb_num_plus(mrb, x, y)
* mrb_num_minus(mrb, x, y)
* num_num_mul(mrb, x, y)
This commit is contained in:
Yukihiro "Matz" Matsumoto
2019-05-20 14:59:25 +09:00
parent 05e7544583
commit 8b8bf9f3f6
2 changed files with 52 additions and 6 deletions
+4
View File
@@ -36,6 +36,10 @@ MRB_API mrb_value mrb_float_to_str(mrb_state *mrb, mrb_value x, const char *fmt)
MRB_API mrb_float mrb_to_flo(mrb_state *mrb, mrb_value x);
#endif
MRB_API mrb_value mrb_num_plus(mrb_state *mrb, mrb_value x, mrb_value y);
MRB_API mrb_value mrb_num_minus(mrb_state *mrb, mrb_value x, mrb_value y);
MRB_API mrb_value mrb_num_mul(mrb_state *mrb, mrb_value x, mrb_value y);
#ifndef __has_builtin
#define __has_builtin(x) 0
#endif