mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* include/ruby/intern.h (rb_exc_new2): optimization for literal.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									99945ed664
								
							
						
					
					
						commit
						4c79d4bee2
					
				
					 3 changed files with 12 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -1,3 +1,7 @@
 | 
			
		|||
Mon Jun  1 10:41:41 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>
 | 
			
		||||
 | 
			
		||||
	* include/ruby/intern.h (rb_exc_new2): optimization for literal.
 | 
			
		||||
 | 
			
		||||
Mon Jun  1 07:20:02 2009  Yukihiro Matsumoto  <matz@ruby-lang.org>
 | 
			
		||||
 | 
			
		||||
	* ext/bigdecimal/bigdecimal.c (BigDecimal_to_f): returns Inf if
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										2
									
								
								error.c
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								error.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -348,6 +348,8 @@ VALUE rb_eSystemCallError;
 | 
			
		|||
VALUE rb_mErrno;
 | 
			
		||||
static VALUE rb_eNOERROR;
 | 
			
		||||
 | 
			
		||||
#undef rb_exc_new2
 | 
			
		||||
 | 
			
		||||
VALUE
 | 
			
		||||
rb_exc_new(VALUE etype, const char *ptr, long len)
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -693,6 +693,12 @@ size_t rb_str_capacity(VALUE);
 | 
			
		|||
	rb_str_cat(str, ptr, strlen(ptr)) :	\
 | 
			
		||||
	rb_str_cat2(str, ptr);			\
 | 
			
		||||
})
 | 
			
		||||
#define rb_exc_new2(klass, ptr) __extension__ ( \
 | 
			
		||||
{						\
 | 
			
		||||
    (__builtin_constant_p(ptr)) ?	        \
 | 
			
		||||
	rb_exc_new(klass, ptr, strlen(ptr)) :	\
 | 
			
		||||
	rb_exc_new2(klass, ptr);		\
 | 
			
		||||
})
 | 
			
		||||
#endif
 | 
			
		||||
#define rb_str_new2 rb_str_new_cstr
 | 
			
		||||
#define rb_str_new3 rb_str_new_shared
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue