1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
akr 2008-09-13 17:05:49 +00:00
parent c965010582
commit d3974573e7
4 changed files with 14 additions and 4 deletions

View file

@ -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

View file

@ -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

View file

@ -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 */

View file

@ -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);