mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	insns.def: avoid type-punned pointer cast
* insns.def (once), vm_insnhelper.c (vm_once_exec): turn the parameter into a VALUE to get rid of type-punned pointer cast. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									90a9db6e6c
								
							
						
					
					
						commit
						7d9b37cc53
					
				
					 2 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -1250,7 +1250,7 @@ once
 | 
			
		|||
	}
 | 
			
		||||
	else if (is->once.running_thread == th) {
 | 
			
		||||
	    /* recursive once */
 | 
			
		||||
	    val = vm_once_exec(iseq);
 | 
			
		||||
	    val = vm_once_exec((VALUE)iseq);
 | 
			
		||||
	}
 | 
			
		||||
	else {
 | 
			
		||||
	    /* waiting for finish */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2397,9 +2397,9 @@ vm_make_proc_with_iseq(rb_iseq_t *blockiseq)
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
static VALUE
 | 
			
		||||
vm_once_exec(rb_iseq_t *iseq)
 | 
			
		||||
vm_once_exec(VALUE iseq)
 | 
			
		||||
{
 | 
			
		||||
    VALUE proc = vm_make_proc_with_iseq(iseq);
 | 
			
		||||
    VALUE proc = vm_make_proc_with_iseq((rb_iseq_t *)iseq);
 | 
			
		||||
    return rb_proc_call_with_block(proc, 0, 0, Qnil);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue