diff options
| author | Aaron Patterson <tenderlove@ruby-lang.org> | 2021-06-02 13:29:03 -0700 |
|---|---|---|
| committer | Aaron Patterson <tenderlove@ruby-lang.org> | 2021-06-02 14:13:34 -0700 |
| commit | bc65cf1a920b715635fbd3e658c4abdebfb87e3b (patch) | |
| tree | d3e10871cb92218a9954c545887f09489d956ea2 | |
| parent | ad734a8cc3181cb4ad510e3c7dc73dd8bb943742 (diff) | |
use a bool instead of int
| -rw-r--r-- | gc.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -5191,13 +5191,13 @@ gc_compact_finish(rb_objspace_t *objspace, rb_heap_t *heap) 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 * 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) { |
