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

ruby-changes:1746

From: ko1@a...
Date: 23 Aug 2007 16:55:47 +0900
Subject: [ruby-changes:1746] nobu - Ruby:r13237 (trunk): * cont.c (rb_cont_call, fiber_switch, rb_fiber_resume, rb_fiber_yield):

nobu	2007-08-23 16:55:37 +0900 (Thu, 23 Aug 2007)

  New Revision: 13237

  Modified files:
    trunk/ChangeLog
    trunk/cont.c

  Log:
    * cont.c (rb_cont_call, fiber_switch, rb_fiber_resume, rb_fiber_yield):
      suppress warnings.
    
    * cont.c (rb_fiber_start): change on non-volatile variable between
      setjmp and longjmp may not has an effect.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/cont.c?r1=13237&r2=13236
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=13237&r2=13236

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 13236)
+++ ChangeLog	(revision 13237)
@@ -1,3 +1,11 @@
+Thu Aug 23 16:55:35 2007  Nobuyoshi Nakada  <nobu@r...>
+
+	* cont.c (rb_cont_call, fiber_switch, rb_fiber_resume, rb_fiber_yield):
+	  suppress warnings.
+
+	* cont.c (rb_fiber_start): change on non-volatile variable between
+	  setjmp and longjmp may not has an effect.
+
 Thu Aug 23 16:04:11 2007  Koichi Sasada  <ko1@a...>
 
 	* compile.c, insns.def, parse.y: fix massign order.  This change
Index: cont.c
===================================================================
--- cont.c	(revision 13236)
+++ cont.c	(revision 13237)
@@ -465,7 +465,7 @@
 
     cont->value = make_passing_arg(argc, argv);
 
-    cont_restore_0(cont, (VALUE *)&cont);
+    cont_restore_0(cont, &contval);
     return Qnil; /* unreachable */
 }
 
@@ -555,9 +555,9 @@
     VALUE args;
     int state;
 
+    GetContPtr(th->fiber, cont);
     TH_PUSH_TAG(th);
     if ((state = EXEC_TAG()) == 0) {
-	GetContPtr(th->fiber, cont);
 	GetProcPtr(cont->saved_thread.first_proc, proc);
 	args = cont->value;
 	cont->value = Qnil;
@@ -651,7 +651,7 @@
     cont->value = make_passing_arg(argc, argv);
 
     if ((value = cont_store(cont)) == Qundef) {
-	cont_restore_0(cont, (VALUE *)&cont);
+	cont_restore_0(cont, &value);
 	rb_bug("rb_fiber_resume: unreachable");
     }
 
@@ -669,9 +669,7 @@
 VALUE
 rb_fiber_resume(VALUE fib, int argc, VALUE *argv)
 {
-    int i;
     rb_context_t *cont;
-    VALUE curr = rb_fiber_current();
     GetContPtr(fib, cont);
 
     if (cont->prev != Qnil) {
@@ -684,7 +682,7 @@
 VALUE
 rb_fiber_yield(int argc, VALUE *argv)
 {
-    rb_fiber_transfer(return_fiber(), argc, argv);
+    return rb_fiber_transfer(return_fiber(), argc, argv);
 }
 
 VALUE

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

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