[前][次][番号順一覧][スレッド一覧]

ruby-changes:2968

From: ko1@a...
Date: 22 Dec 2007 14:05:41 +0900
Subject: [ruby-changes:2968] ko1 - Ruby:r14459 (trunk): * array.c (rb_ary_permutation): add volatile to avoid GC problem.

ko1	2007-12-22 14:05:30 +0900 (Sat, 22 Dec 2007)

  New Revision: 14459

  Modified files:
    trunk/ChangeLog
    trunk/array.c

  Log:
    * array.c (rb_ary_permutation): add volatile to avoid GC problem.
    


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/array.c?r1=14459&r2=14458
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14459&r2=14458

Index: array.c
===================================================================
--- array.c	(revision 14458)
+++ array.c	(revision 14459)
@@ -3069,9 +3069,9 @@
 	}
     }
     else {             /* this is the general case */
-	VALUE t0 = tmpbuf(n,sizeof(long));
+	volatile VALUE t0 = tmpbuf(n,sizeof(long));
 	long *p = (long*)RSTRING_PTR(t0);
-	VALUE t1 = tmpbuf(n,sizeof(int));
+	volatile VALUE t1 = tmpbuf(n,sizeof(int));
 	int *used = (int*)RSTRING_PTR(t1);
 	VALUE ary0 = ary_make_shared(ary); /* private defensive copy of ary */
 
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 14458)
+++ ChangeLog	(revision 14459)
@@ -1,3 +1,7 @@
+Sat Dec 22 14:02:58 2007  Koichi Sasada  <ko1@a...>
+
+	* array.c (rb_ary_permutation): add volatile to avoid GC problem.
+
 Sat Dec 22 11:47:42 2007  Koichi Sasada  <ko1@a...>
 
 	* eval.c (rb_obj_instance_eval): use class of immediate objects.

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml

[前][次][番号順一覧][スレッド一覧]