mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* marshal.c (r_object0): Generalize a round up expression.
Use BDIGIT instead of int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									aff64b9478
								
							
						
					
					
						commit
						5eab13c377
					
				
					 2 changed files with 7 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -1,3 +1,8 @@
 | 
			
		|||
Wed Jun  5 00:09:32 2013  Tanaka Akira  <akr@fsij.org>
 | 
			
		||||
 | 
			
		||||
	* marshal.c (r_object0): Generalize a round up expression.
 | 
			
		||||
	  Use BDIGIT instead of int.
 | 
			
		||||
 | 
			
		||||
Tue Jun  4 23:44:02 2013  Ayumu AIZAWA  <ayumu.aizawa@gmail.com>
 | 
			
		||||
 | 
			
		||||
	* object.c (rb_Hash): fix docs. patched by Stefan Schüßler.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1620,7 +1620,7 @@ r_object0(struct load_arg *arg, int *ivp, VALUE extmod)
 | 
			
		|||
#if SIZEOF_BDIGITS == SIZEOF_SHORT
 | 
			
		||||
            rb_big_resize((VALUE)big, len);
 | 
			
		||||
#else
 | 
			
		||||
            rb_big_resize((VALUE)big, (len + 1) * 2 / sizeof(BDIGIT));
 | 
			
		||||
            rb_big_resize((VALUE)big, (len * 2 + sizeof(BDIGIT) - 1) / sizeof(BDIGIT));
 | 
			
		||||
#endif
 | 
			
		||||
            digits = RBIGNUM_DIGITS(big);
 | 
			
		||||
	    MEMCPY(digits, RSTRING_PTR(data), char, len * 2);
 | 
			
		||||
| 
						 | 
				
			
			@ -1638,7 +1638,7 @@ r_object0(struct load_arg *arg, int *ivp, VALUE extmod)
 | 
			
		|||
		int i;
 | 
			
		||||
 | 
			
		||||
		for (i=0; i<SIZEOF_BDIGITS; i++) {
 | 
			
		||||
		    num |= (int)p[i] << shift;
 | 
			
		||||
		    num |= (BDIGIT)p[i] << shift;
 | 
			
		||||
		    shift += 8;
 | 
			
		||||
		}
 | 
			
		||||
#else
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue