ruby-changes:66411
From: Aaron <ko1@a...>
Date: Thu, 3 Jun 2021 06:13:56 +0900 (JST)
Subject: [ruby-changes:66411] bc65cf1a92 (master): use a bool instead of int
https://git.ruby-lang.org/ruby.git/commit/?id=bc65cf1a92 From bc65cf1a920b715635fbd3e658c4abdebfb87e3b Mon Sep 17 00:00:00 2001 From: Aaron Patterson <tenderlove@r...> Date: Wed, 2 Jun 2021 13:29:03 -0700 Subject: use a bool instead of int --- gc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gc.c b/gc.c index 903d23c..18d4f32 100644 --- a/gc.c +++ b/gc.c @@ -5191,13 +5191,13 @@ gc_compact_finish(rb_objspace_t *objspace, rb_heap_t *heap) https://github.com/ruby/ruby/blob/trunk/gc.c#L5191 objspace->flags.during_compacting = FALSE; } -static int +static bool gc_fill_swept_page(rb_objspace_t *objspace, rb_heap_t *heap, struct heap_page *sweep_page, int *freed_slots, int *empty_slots) { /* Find any pinned but not marked objects and try to fill those slots */ int i; int moved_slots = 0; - int finished_compacting = 0; + bool finished_compacting = false; bits_t *mark_bits, *pin_bits; bits_t bitset; RVALUE *p, *offset; @@ -5242,7 +5242,7 @@ gc_fill_swept_page(rb_objspace_t *objspace, rb_heap_t *heap, struct heap_page *s https://github.com/ruby/ruby/blob/trunk/gc.c#L5242 * their memory until they have their finalizers run.*/ if (BUILTIN_TYPE(dest) != T_ZOMBIE) { if(!try_move(objspace, heap, sweep_page, dest)) { - finished_compacting = 1; + finished_compacting = true; (void)VALGRIND_MAKE_MEM_UNDEFINED((void*)p, sizeof(RVALUE)); gc_report(5, objspace, "Quit compacting, couldn't find an object to move\n"); if (BUILTIN_TYPE(dest) == T_NONE) { -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/