mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									e39eb9dab5
								
							
						
					
					
						commit
						4af553f1e7
					
				
					 2 changed files with 12 additions and 6 deletions
				
			
		
							
								
								
									
										10
									
								
								cont.c
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								cont.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -465,7 +465,7 @@ rb_cont_call(int argc, VALUE *argv, VALUE contval)
 | 
			
		|||
 | 
			
		||||
    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 @@ rb_fiber_start(void)
 | 
			
		|||
    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 @@ fiber_switch(VALUE fib, int argc, VALUE *argv, int is_resume)
 | 
			
		|||
    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 @@ rb_fiber_transfer(VALUE fib, int argc, VALUE *argv)
 | 
			
		|||
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 @@ rb_fiber_resume(VALUE fib, int argc, VALUE *argv)
 | 
			
		|||
VALUE
 | 
			
		||||
rb_fiber_yield(int argc, VALUE *argv)
 | 
			
		||||
{
 | 
			
		||||
    rb_fiber_transfer(return_fiber(), argc, argv);
 | 
			
		||||
    return rb_fiber_transfer(return_fiber(), argc, argv);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
VALUE
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue