[ruby-cvs:73265] ko1:r66165 (trunk): make `RARRAY_PTR_USE` more conservertive.

ko1 at ruby-lang.org ko1 at ruby-lang.org
Mon Dec 3 21:36:39 JST 2018


ko1	2018-12-03 21:36:39 +0900 (Mon, 03 Dec 2018)

  New Revision: 66165

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

  Log:
    make `RARRAY_PTR_USE` more conservertive.
    
    * include/ruby/ruby.h: de-transient at
      `RARRAY_PTR_USE` and `RARRAY_PTR_USE_START`.
      Introduce `RARRAY_PTR_USE_TRANSIENT` and
      `RARRAY_PTR_USE_START_TRANSIENT` if you don't want to
      de-transient an array. Generally, it is difficult
      so C-extension writers should not use them.
    
    * array.c: use `RARRAY_PTR_USE_TRANSIENT` if possible.
    
    * hash.c: ditto.
    
    * enum.c (enum_sort_by): remove `rb_ary_transient_heap_evacuate()`
      because `RARRAY_PTR_USE` do de-transient.

  Modified files:
    trunk/array.c
    trunk/enum.c
    trunk/hash.c
    trunk/include/ruby/ruby.h
    trunk/internal.h


More information about the ruby-cvs mailing list