ruby-changes:31499
From: glass <ko1@a...>
Date: Fri, 8 Nov 2013 10:52:13 +0900 (JST)
Subject: [ruby-changes:31499] glass:r43578 (trunk): * enumerator.c (append_method): use RARRAY_CONST_PTR().
glass 2013-11-08 10:52:07 +0900 (Fri, 08 Nov 2013) New Revision: 43578 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43578 Log: * enumerator.c (append_method): use RARRAY_CONST_PTR(). * enumerator.c (lazy_init_iterator): ditto. Modified files: trunk/ChangeLog trunk/enumerator.c Index: ChangeLog =================================================================== --- ChangeLog (revision 43577) +++ ChangeLog (revision 43578) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Fri Nov 8 10:49:34 2013 Masaki Matsushita <glass.saga@g...> + + * enumerator.c (append_method): use RARRAY_CONST_PTR(). + + * enumerator.c (lazy_init_iterator): ditto. + Fri Nov 8 02:44:29 2013 Koichi Sasada <ko1@a...> * gc.c (vm_malloc_increase): check GVL before gc_rest_sweep(). Index: enumerator.c =================================================================== --- enumerator.c (revision 43577) +++ enumerator.c (revision 43578) @@ -990,7 +990,7 @@ append_method(VALUE obj, VALUE str, ID d https://github.com/ruby/ruby/blob/trunk/enumerator.c#L990 } if (eargs != Qfalse) { long argc = RARRAY_LEN(eargs); - VALUE *argv = RARRAY_PTR(eargs); + const VALUE *argv = RARRAY_CONST_PTR(eargs); /* WB: no new reference */ if (argc > 0) { rb_str_buf_cat2(str, "("); @@ -1336,7 +1336,7 @@ lazy_init_iterator(VALUE val, VALUE m, i https://github.com/ruby/ruby/blob/trunk/enumerator.c#L1336 if (argc > 0) { rb_ary_cat(args, argv, argc); } - result = rb_yield_values2(len, RARRAY_PTR(args)); + result = rb_yield_values2(len, RARRAY_CONST_PTR(args)); RB_GC_GUARD(args); } if (result == Qundef) rb_iter_break(); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/