use mrb_bool, FALSE and TRUE more

It doesn't matter to me if one is using FALSE/TRUE instead of 1/0
but I prefer a type (alias) which emphasizes boolean vars to int.
I changed 1/0 to FALSE/TRUE anyway.
This commit is contained in:
cremno
2014-01-31 16:06:45 +01:00
parent 7c9a1accff
commit 4507985c3e
16 changed files with 49 additions and 49 deletions
+4 -4
View File
@@ -981,7 +981,7 @@ gen_send_intern(codegen_scope *s)
push();
}
static void
gen_literal_array(codegen_scope *s, node *tree, int sym, int val)
gen_literal_array(codegen_scope *s, node *tree, mrb_bool sym, int val)
{
if (val) {
int i = 0, j = 0;
@@ -1069,7 +1069,7 @@ readint_float(codegen_scope *s, const char *p, int base)
}
static mrb_int
readint_mrb_int(codegen_scope *s, const char *p, int base, int neg, int *overflow)
readint_mrb_int(codegen_scope *s, const char *p, int base, mrb_bool neg, mrb_bool *overflow)
{
const char *e = p + strlen(p);
mrb_int result = 0;
@@ -1933,7 +1933,7 @@ codegen(codegen_scope *s, node *tree, int val)
int base = (intptr_t)tree->cdr->car;
mrb_int i;
mrb_code co;
int overflow;
mrb_bool overflow;
i = readint_mrb_int(s, p, base, FALSE, &overflow);
if (overflow) {
@@ -1989,7 +1989,7 @@ codegen(codegen_scope *s, node *tree, int val)
int base = (intptr_t)tree->cdr->car;
mrb_int i;
mrb_code co;
int overflow;
mrb_bool overflow;
i = readint_mrb_int(s, p, base, TRUE, &overflow);
if (overflow) {