mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mrb_range_new excl flag use mrb_bool insteard of int
This commit is contained in:
+2
-2
@@ -1448,7 +1448,7 @@ codegen(codegen_scope *s, node *tree, int val)
|
||||
codegen(s, tree->cdr, val);
|
||||
if (val) {
|
||||
pop(); pop();
|
||||
genop(s, MKOP_ABC(OP_RANGE, cursp(), cursp(), 0));
|
||||
genop(s, MKOP_ABC(OP_RANGE, cursp(), cursp(), FALSE));
|
||||
push();
|
||||
}
|
||||
break;
|
||||
@@ -1458,7 +1458,7 @@ codegen(codegen_scope *s, node *tree, int val)
|
||||
codegen(s, tree->cdr, val);
|
||||
if (val) {
|
||||
pop(); pop();
|
||||
genop(s, MKOP_ABC(OP_RANGE, cursp(), cursp(), 1));
|
||||
genop(s, MKOP_ABC(OP_RANGE, cursp(), cursp(), TRUE));
|
||||
push();
|
||||
}
|
||||
break;
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ range_check(mrb_state *mrb, mrb_value a, mrb_value b)
|
||||
}
|
||||
|
||||
mrb_value
|
||||
mrb_range_new(mrb_state *mrb, mrb_value beg, mrb_value end, int excl)
|
||||
mrb_range_new(mrb_state *mrb, mrb_value beg, mrb_value end, mrb_bool excl)
|
||||
{
|
||||
struct RRange *r;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user