summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-11-25 14:14:44 (GMT)
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-11-25 14:14:44 (GMT)
commitbd98301784605e72eb8b4c61cae9cb57c802dea1 (patch)
tree48f564a2a59cc1fce97d1a62a4b1d5cbd6a82e1d /regcomp.c
parentb00dfcca177fde79630e182934f509fcdd9f3998 (diff)
* 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
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/regcomp.c b/regcomp.c
index 5fd4a24..d946b3f 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -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;