diff options
author | S-H-GAMELINKS <[email protected]> | 2021-08-31 20:30:35 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2021-09-05 23:01:27 +0900 |
commit | bdd6d8746f0a07b2c0cc3a6b387bf594569c0bb7 (patch) | |
tree | f11d32da65e227763d598d765765a76ddace1a0a /gc.c | |
parent | 8f752c95d20134bcc0b5394f1cea723a40f1ac8c (diff) |
Replace RBOOL macro
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4791
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -10445,8 +10445,8 @@ gc_info_decode(rb_objspace_t *objspace, const VALUE hash_or_key, const unsigned Qnil ); - SET(have_finalizer, (flags & GPR_FLAG_HAVE_FINALIZE) ? Qtrue : Qfalse); - SET(immediate_sweep, (flags & GPR_FLAG_IMMEDIATE_SWEEP) ? Qtrue : Qfalse); + SET(have_finalizer, RBOOL(flags & GPR_FLAG_HAVE_FINALIZE)); + SET(immediate_sweep, RBOOL(flags & GPR_FLAG_IMMEDIATE_SWEEP)); if (orig_flags == 0) { SET(state, gc_mode(objspace) == gc_mode_none ? sym_none : @@ -12732,7 +12732,7 @@ gc_profile_record_get(VALUE _) rb_hash_aset(prof, ID2SYM(rb_intern("REMOVING_OBJECTS")), SIZET2NUM(record->removing_objects)); rb_hash_aset(prof, ID2SYM(rb_intern("EMPTY_OBJECTS")), SIZET2NUM(record->empty_objects)); - rb_hash_aset(prof, ID2SYM(rb_intern("HAVE_FINALIZE")), (record->flags & GPR_FLAG_HAVE_FINALIZE) ? Qtrue : Qfalse); + rb_hash_aset(prof, ID2SYM(rb_intern("HAVE_FINALIZE")), RBOOL(record->flags & GPR_FLAG_HAVE_FINALIZE)); #endif #if RGENGC_PROFILE > 0 @@ -13553,7 +13553,7 @@ Init_GC(void) rb_mGC = rb_define_module("GC"); gc_constants = rb_hash_new(); - rb_hash_aset(gc_constants, ID2SYM(rb_intern("DEBUG")), GC_DEBUG ? Qtrue : Qfalse); + rb_hash_aset(gc_constants, ID2SYM(rb_intern("DEBUG")), RBOOL(GC_DEBUG)); rb_hash_aset(gc_constants, ID2SYM(rb_intern("RVALUE_SIZE")), SIZET2NUM(sizeof(RVALUE))); rb_hash_aset(gc_constants, ID2SYM(rb_intern("HEAP_PAGE_OBJ_LIMIT")), SIZET2NUM(HEAP_PAGE_OBJ_LIMIT)); rb_hash_aset(gc_constants, ID2SYM(rb_intern("HEAP_PAGE_BITMAP_SIZE")), SIZET2NUM(HEAP_PAGE_BITMAP_SIZE)); |