ruby-changes:30350
From: ko1 <ko1@a...>
Date: Wed, 7 Aug 2013 13:21:05 +0900 (JST)
Subject: [ruby-changes:30350] ko1:r42419 (trunk): * random.c (random_load): use RARRAY_RAWPTR() instead of
ko1 2013-08-07 13:20:56 +0900 (Wed, 07 Aug 2013) New Revision: 42419 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42419 Log: * random.c (random_load): use RARRAY_RAWPTR() instead of RARRAY_PTR() because there is no new reference. Modified files: trunk/ChangeLog trunk/random.c _______________________________________________ ruby-cvs mailing list ruby-cvs@r... http://lists.ruby-lang.org/cgi-bin/mailman/listinfo/ruby-cvs Index: ChangeLog =================================================================== --- ChangeLog (revision 42418) +++ ChangeLog (revision 42419) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed Aug 7 13:20:12 2013 Koichi Sasada <ko1@a...> + + * random.c (random_load): use RARRAY_RAWPTR() instead of + RARRAY_PTR() because there is no new reference. + Wed Aug 7 12:58:23 2013 Koichi Sasada <ko1@a...> * thread.c (thread_start_func_2): use RARRAY_RAWPTR() instead of Index: random.c =================================================================== --- random.c (revision 42418) +++ random.c (revision 42419) @@ -627,12 +627,12 @@ random_load(VALUE obj, VALUE dump) https://github.com/ruby/ruby/blob/trunk/random.c#L627 rb_random_t *rnd = get_rnd(obj); struct MT *mt = &rnd->mt; VALUE state, left = INT2FIX(1), seed = INT2FIX(0); - VALUE *ary; + const VALUE *ary; unsigned long x; rb_check_copyable(obj, dump); Check_Type(dump, T_ARRAY); - ary = RARRAY_PTR(dump); + ary = RARRAY_RAWPTR(dump); switch (RARRAY_LEN(dump)) { case 3: seed = ary[2]; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/