mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* complex.c (make_patterns): constified.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									85976cf893
								
							
						
					
					
						commit
						e39b93b86e
					
				
					 2 changed files with 10 additions and 8 deletions
				
			
		
							
								
								
									
										10
									
								
								complex.c
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								complex.c
									
										
									
									
									
								
							|  | @ -1138,10 +1138,12 @@ static VALUE comp_pat1, comp_pat2, a_slash, a_dot_and_an_e, | ||||||
| static void | static void | ||||||
| make_patterns(void) | make_patterns(void) | ||||||
| { | { | ||||||
|     static char comp_pat1_source[] = PATTERN1; |     static const char comp_pat1_source[] = PATTERN1; | ||||||
|     static char comp_pat2_source[] = PATTERN2; |     static const char comp_pat2_source[] = PATTERN2; | ||||||
|     static char image_garbages_pat_source[] = "[+\\(\\)iIjJ]"; |     static const char image_garbages_pat_source[] = "[+\\(\\)iIjJ]"; | ||||||
|     static char underscores_pat_source[] = "_+"; |     static const char underscores_pat_source[] = "_+"; | ||||||
|  | 
 | ||||||
|  |     if (comp_pat1) return; | ||||||
| 
 | 
 | ||||||
|     comp_pat1 = rb_reg_new(comp_pat1_source, sizeof comp_pat1_source - 1, 0); |     comp_pat1 = rb_reg_new(comp_pat1_source, sizeof comp_pat1_source - 1, 0); | ||||||
|     rb_global_variable(&comp_pat1); |     rb_global_variable(&comp_pat1); | ||||||
|  |  | ||||||
|  | @ -1287,10 +1287,10 @@ static VALUE rat_pat, an_e_pat, a_dot_pat, underscores_pat, an_underscore; | ||||||
| static void | static void | ||||||
| make_patterns(void) | make_patterns(void) | ||||||
| { | { | ||||||
|     static char const rat_pat_source[] = PATTERN; |     static const char rat_pat_source[] = PATTERN; | ||||||
|     static char const an_e_pat_source[] = "[eE]"; |     static const char an_e_pat_source[] = "[eE]"; | ||||||
|     static char const a_dot_pat_source[] = "\\."; |     static const char a_dot_pat_source[] = "\\."; | ||||||
|     static char const underscores_pat_source[] = "_+"; |     static const char underscores_pat_source[] = "_+"; | ||||||
| 
 | 
 | ||||||
|     if (rat_pat) return; |     if (rat_pat) return; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 nobu
						nobu