summaryrefslogtreecommitdiff
path: root/regexec.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 /regexec.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 'regexec.c')
-rw-r--r--regexec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/regexec.c b/regexec.c
index c03e6e3..0c2f574 100644
--- a/regexec.c
+++ b/regexec.c
@@ -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