mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* regcomp.c (print_distance_range): use PRIuSIZE.
* regcomp.c (print_optimize_info): use %ld because the type of calcutated value of integers is long. * regexec.c (onig_print_compiled_byte_code): add prototype. * regexec.c (match_at): add 2nd argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									b00dfcca17
								
							
						
					
					
						commit
						bd98301784
					
				
					 3 changed files with 18 additions and 4 deletions
				
			
		
							
								
								
									
										11
									
								
								ChangeLog
									
										
									
									
									
								
							
							
						
						
									
										11
									
								
								ChangeLog
									
										
									
									
									
								
							|  | @ -1,3 +1,14 @@ | |||
| Thu Nov 25 23:10:49 2010  NARUSE, Yui  <naruse@ruby-lang.org> | ||||
| 
 | ||||
| 	* regcomp.c (print_distance_range): use PRIuSIZE. | ||||
| 
 | ||||
| 	* regcomp.c (print_optimize_info): use %ld because the type of | ||||
| 	  calcutated value of integers is long. | ||||
| 
 | ||||
| 	* regexec.c (onig_print_compiled_byte_code): add prototype. | ||||
| 
 | ||||
| 	* regexec.c (match_at): add 2nd argument. | ||||
| 
 | ||||
| Thu Nov 25 10:29:55 2010  NAKAMURA Usaku  <usa@ruby-lang.org> | ||||
| 
 | ||||
| 	* ext/dl/callback/mkcallback.rb (gencallback): shouldn't assume that | ||||
|  |  | |||
|  | @ -5093,14 +5093,14 @@ print_distance_range(FILE* f, OnigDistance a, OnigDistance b) | |||
|   if (a == ONIG_INFINITE_DISTANCE) | ||||
|     fputs("inf", f); | ||||
|   else | ||||
|     fprintf(f, "(%u)", a); | ||||
|     fprintf(f, "(%"PRIuSIZE")", a); | ||||
| 
 | ||||
|   fputs("-", f); | ||||
| 
 | ||||
|   if (b == ONIG_INFINITE_DISTANCE) | ||||
|     fputs("inf", f); | ||||
|   else | ||||
|     fprintf(f, "(%u)", b); | ||||
|     fprintf(f, "(%"PRIuSIZE")", b); | ||||
| } | ||||
| 
 | ||||
| static void | ||||
|  | @ -5176,7 +5176,7 @@ print_optimize_info(FILE* f, regex_t* reg) | |||
|     for (p = reg->exact; p < reg->exact_end; p++) { | ||||
|       fputc(*p, f); | ||||
|     } | ||||
|     fprintf(f, "]: length: %d\n", (reg->exact_end - reg->exact)); | ||||
|     fprintf(f, "]: length: %ld\n", (reg->exact_end - reg->exact)); | ||||
|   } | ||||
|   else if (reg->optimize & ONIG_OPTIMIZE_MAP) { | ||||
|     int c, i, n = 0; | ||||
|  |  | |||
|  | @ -1240,6 +1240,9 @@ typedef struct { | |||
|   regoff_t  rm_eo; | ||||
| } posix_regmatch_t; | ||||
| 
 | ||||
| void onig_print_compiled_byte_code(FILE* f, UChar* bp, UChar* bpend, UChar** nextp, | ||||
|                               OnigEncoding enc); | ||||
| 
 | ||||
| /* match data(str - end) from position (sstart). */ | ||||
| /* if sstart == str then set sprev to NULL. */ | ||||
| static long | ||||
|  | @ -1314,7 +1317,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, | |||
|       *bp = 0; | ||||
|       fputs((char* )buf, stderr); | ||||
|       for (i = 0; i < 20 - (bp - buf); i++) fputc(' ', stderr); | ||||
|       onig_print_compiled_byte_code(stderr, p, NULL, encode); | ||||
|       onig_print_compiled_byte_code(stderr, p, p + strlen((char *)p), NULL, encode); | ||||
|       fprintf(stderr, "\n"); | ||||
|     } | ||||
| #endif | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 naruse
						naruse