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

ruby-changes:47041

From: nobu <ko1@a...>
Date: Fri, 23 Jun 2017 16:53:12 +0900 (JST)
Subject: [ruby-changes:47041] nobu:r59156 (trunk): thread.c: suppress warning

nobu	2017-06-23 16:53:07 +0900 (Fri, 23 Jun 2017)

  New Revision: 59156

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

  Log:
    thread.c: suppress warning
    
    * thread.c (exec_recursive): rb_catch_protect() uses `int*` as
      well as rb_protect.

  Modified files:
    trunk/thread.c
Index: thread.c
===================================================================
--- thread.c	(revision 59155)
+++ thread.c	(revision 59156)
@@ -4689,11 +4689,10 @@ exec_recursive(VALUE (*func) (VALUE, VAL https://github.com/ruby/ruby/blob/trunk/thread.c#L4689
 	return (*func)(obj, arg, TRUE);
     }
     else {
-	enum ruby_tag_type state;
-
 	p.func = func;
 
 	if (outermost) {
+	    int state;
 	    recursive_push(p.list, ID2SYM(recursive_key), 0);
 	    recursive_push(p.list, p.objid, p.pairid);
 	    result = rb_catch_protect(p.list, exec_recursive_i, (VALUE)&p, &state);
@@ -4705,6 +4704,7 @@ exec_recursive(VALUE (*func) (VALUE, VAL https://github.com/ruby/ruby/blob/trunk/thread.c#L4704
 	    }
 	}
 	else {
+	    enum ruby_tag_type state;
 	    volatile VALUE ret = Qundef;
 	    recursive_push(p.list, p.objid, p.pairid);
 	    PUSH_TAG();

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

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