summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-13 17:05:49 (GMT)
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-13 17:05:49 (GMT)
commitd3974573e791db91180abacae649c2d6b40e3f5c (patch)
tree77a04bedaf4f5c5fc4ca77d1df59892f742cb1db
parentc96501058270d16b4be35c0cbc8b008182524da0 (diff)
* include/ruby/oniguruma.h
(onigenc_get_right_adjust_char_head_with_prev): add end argument. * regenc.c (onigenc_get_right_adjust_char_head_with_prev): use end argument. * regexec.c (forward_search_range): follow the interface change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog10
-rw-r--r--include/ruby/oniguruma.h2
-rw-r--r--regenc.c4
-rw-r--r--regexec.c2
4 files changed, 14 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 2558633..b52c79d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+Sun Sep 14 02:04:28 2008 Tanaka Akira <akr@fsij.org>
+
+ * include/ruby/oniguruma.h
+ (onigenc_get_right_adjust_char_head_with_prev): add end argument.
+
+ * regenc.c (onigenc_get_right_adjust_char_head_with_prev): use end
+ argument.
+
+ * regexec.c (forward_search_range): follow the interface change.
+
Sun Sep 14 01:38:26 2008 Tanaka Akira <akr@fsij.org>
* include/ruby/oniguruma.h (onigenc_get_right_adjust_char_head): add
diff --git a/include/ruby/oniguruma.h b/include/ruby/oniguruma.h
index cd4bedf..911ea45 100644
--- a/include/ruby/oniguruma.h
+++ b/include/ruby/oniguruma.h
@@ -303,7 +303,7 @@ OnigEncoding onigenc_get_default_encoding P_((void));
ONIG_EXTERN
void onigenc_set_default_caseconv_table P_((const OnigUChar* table));
ONIG_EXTERN
-OnigUChar* onigenc_get_right_adjust_char_head_with_prev P_((OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar** prev));
+OnigUChar* onigenc_get_right_adjust_char_head_with_prev P_((OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar* end, const OnigUChar** prev));
ONIG_EXTERN
OnigUChar* onigenc_get_prev_char_head P_((OnigEncoding enc, const OnigUChar* start, const OnigUChar* s));
ONIG_EXTERN
diff --git a/regenc.c b/regenc.c
index 62bf661..57f0e43 100644
--- a/regenc.c
+++ b/regenc.c
@@ -73,13 +73,13 @@ onigenc_get_right_adjust_char_head(OnigEncoding enc, const UChar* start, const U
extern UChar*
onigenc_get_right_adjust_char_head_with_prev(OnigEncoding enc,
- const UChar* start, const UChar* s, const UChar** prev)
+ const UChar* start, const UChar* s, const UChar* end, const UChar** prev)
{
UChar* p = ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, start, s);
if (p < s) {
if (prev) *prev = (const UChar* )p;
- p += enclen(enc, p, s);
+ p += enclen(enc, p, end);
}
else {
if (prev) *prev = (const UChar* )NULL; /* Sorry */
diff --git a/regexec.c b/regexec.c
index 05bc633..bb55375 100644
--- a/regexec.c
+++ b/regexec.c
@@ -3230,7 +3230,7 @@ forward_search_range(regex_t* reg, const UChar* str, const UChar* end, UChar* s,
*low = p - reg->dmax;
if (*low > s) {
*low = onigenc_get_right_adjust_char_head_with_prev(reg->enc, s,
- *low, (const UChar** )low_prev);
+ *low, end, (const UChar** )low_prev);
if (low_prev && IS_NULL(*low_prev))
*low_prev = onigenc_get_prev_char_head(reg->enc,
(pprev ? pprev : s), *low);