mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* bignum.c (bigsub_int): add RB_GC_GUARD. This patch is made by
Makoto Kishimoto. fixes #4223 [ruby-dev:42907] * bignum.c (bigadd_int): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									ade91aca9f
								
							
						
					
					
						commit
						4b29cccf57
					
				
					 2 changed files with 10 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -1,3 +1,10 @@
 | 
			
		|||
Fri Jul 15 19:11:00 2011  Kenta Murata  <mrkn@mrkn.jp>
 | 
			
		||||
 | 
			
		||||
	* bignum.c (bigsub_int): add RB_GC_GUARD.  This patch is made by
 | 
			
		||||
	  Makoto Kishimoto.  fixes #4223 [ruby-dev:42907]
 | 
			
		||||
 | 
			
		||||
	* bignum.c (bigadd_int): ditto.
 | 
			
		||||
 | 
			
		||||
Fri Jul 15 14:27:53 2011  NAKAMURA Usaku  <usa@ruby-lang.org>
 | 
			
		||||
 | 
			
		||||
	* win32/win32.c, include/ruby/win32.h (rb_w32_io_cancelable_p): renamed
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										3
									
								
								bignum.c
									
										
									
									
									
								
							
							
						
						
									
										3
									
								
								bignum.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -1767,6 +1767,7 @@ bigsub_int(VALUE x, long y0)
 | 
			
		|||
    if (xn == 1 && num < 0) {
 | 
			
		||||
	RBIGNUM_SET_SIGN(z, !RBIGNUM_SIGN(x));
 | 
			
		||||
	zds[0] = (BDIGIT)-num;
 | 
			
		||||
	RB_GC_GUARD(x);
 | 
			
		||||
	return bignorm(z);
 | 
			
		||||
    }
 | 
			
		||||
    zds[0] = BIGLO(num);
 | 
			
		||||
| 
						 | 
				
			
			@ -1793,6 +1794,7 @@ bigsub_int(VALUE x, long y0)
 | 
			
		|||
    if (num < 0) {
 | 
			
		||||
	z = bigsub(x, rb_int2big(y0));
 | 
			
		||||
    }
 | 
			
		||||
    RB_GC_GUARD(x);
 | 
			
		||||
    return bignorm(z);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1845,6 +1847,7 @@ bigadd_int(VALUE x, long y)
 | 
			
		|||
    while (i < zn) {
 | 
			
		||||
	zds[i++] = 0;
 | 
			
		||||
    }
 | 
			
		||||
    RB_GC_GUARD(x);
 | 
			
		||||
    return bignorm(z);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue