summaryrefslogtreecommitdiffhomepage
path: root/src/gc.c
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 /src/gc.c
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 'src/gc.c')
-rw-r--r--src/gc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gc.c b/src/gc.c
index 63301d5cd..7e7e0d3ee 100644
--- a/src/gc.c
+++ b/src/gc.c
@@ -834,13 +834,13 @@ incremental_sweep_phase(mrb_state *mrb, size_t limit)
RVALUE *p = page->objects;
RVALUE *e = p + MRB_HEAP_PAGE_SIZE;
size_t freed = 0;
- int dead_slot = 1;
+ mrb_bool dead_slot = TRUE;
int full = (page->freelist == NULL);
if (is_minor_gc(mrb) && page->old) {
/* skip a slot which doesn't contain any young object */
p = e;
- dead_slot = 0;
+ dead_slot = FALSE;
}
while (p<e) {
if (is_dead(mrb, &p->as.basic)) {