summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-bin-mirb
diff options
context:
space:
mode:
authorcremno <[email protected]>2014-01-31 16:06:45 +0100
committercremno <[email protected]>2014-01-31 18:00:36 +0100
commit4507985c3ea2b3a7d14745f1f432e544ddeafe93 (patch)
tree8dce9e42e85ea6a953b37b7dcce73ce56c277fe4 /mrbgems/mruby-bin-mirb
parent7c9a1accff4c42ec781f14b1ba5abaf0ad1bb037 (diff)
downloadmruby-4507985c3ea2b3a7d14745f1f432e544ddeafe93.tar.gz
mruby-4507985c3ea2b3a7d14745f1f432e544ddeafe93.zip
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.
Diffstat (limited to 'mrbgems/mruby-bin-mirb')
-rw-r--r--mrbgems/mruby-bin-mirb/tools/mirb/mirb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c b/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c
index 75d51265b..db319fd99 100644
--- a/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c
+++ b/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c
@@ -45,7 +45,7 @@ p(mrb_state *mrb, mrb_value obj, int prompt)
static mrb_bool
is_code_block_open(struct mrb_parser_state *parser)
{
- int code_block_open = FALSE;
+ mrb_bool code_block_open = FALSE;
/* check for heredoc */
if (parser->parsing_heredoc != NULL) return TRUE;
@@ -251,9 +251,9 @@ main(int argc, char **argv)
mrb_value result;
struct _args args;
int n;
- int code_block_open = FALSE;
+ mrb_bool code_block_open = FALSE;
int ai;
- int first_command = 1;
+ mrb_bool first_command = TRUE;
unsigned int nregs;
/* new interpreter instance */
@@ -392,7 +392,7 @@ main(int argc, char **argv)
}
mrb_parser_free(parser);
cxt->lineno++;
- first_command = 0;
+ first_command = FALSE;
}
mrbc_context_free(mrb, cxt);
mrb_close(mrb);