[ruby-cvs:70666] normal:r63575 (trunk): gc.c: reduce parameters for gc_start and garbage_collect

normal at ruby-lang.org normal at ruby-lang.org
Wed Jun 6 05:16:22 JST 2018


normal	2018-06-06 05:16:21 +0900 (Wed, 06 Jun 2018)

  New Revision: 63575

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63575

  Log:
    gc.c: reduce parameters for gc_start and garbage_collect
    
    Every time I look at gc.c, I get confused by argument ordering:
    
    gc_start(..., TRUE, TRUE, FALSE, ...)
    gc_start(..., FALSE, FALSE, FALSE, ... )
    
    While we do not have kwargs in C, we can use flags to improve readability:
    
    gc_start(...,
    GPR_FLAG_FULL_MARK | GPR_FLAG_IMMEDIATE_MARK |
    GPR_FLAG_IMMEDIATE_SWEEP | ...)
    
    [ruby-core:87311] [Misc #14798]

  Modified files:
    trunk/gc.c


More information about the ruby-cvs mailing list