mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
merges r28637 from trunk into ruby_1_9_2.
-- * regexec.c (match_at): add end point to enclen's argument. This only effect on compilinig with -DONIG_DEBUG_MATCH. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@28737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b0d5064d4a
commit
25380b0a57
2 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Wed Jul 14 18:18:05 2010 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
|
* regexec.c (match_at): add end point to enclen's argument.
|
||||||
|
This only effect on compilinig with -DONIG_DEBUG_MATCH.
|
||||||
|
|
||||||
Tue Jul 13 20:46:00 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Tue Jul 13 20:46:00 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* ext/dl/handle.c (rb_dlhandle_close): should not pass a dynamic
|
* ext/dl/handle.c (rb_dlhandle_close): should not pass a dynamic
|
||||||
|
|
|
@ -1300,13 +1300,13 @@ match_at(regex_t* reg, const UChar* str, const UChar* end,
|
||||||
s = (UChar* )sstart;
|
s = (UChar* )sstart;
|
||||||
while (1) {
|
while (1) {
|
||||||
#ifdef ONIG_DEBUG_MATCH
|
#ifdef ONIG_DEBUG_MATCH
|
||||||
{
|
if (s) {
|
||||||
UChar *q, *bp, buf[50];
|
UChar *q, *bp, buf[50];
|
||||||
int len;
|
int len;
|
||||||
fprintf(stderr, "%4d> \"", (int )(s - str));
|
fprintf(stderr, "%4d> \"", (int )(s - str));
|
||||||
bp = buf;
|
bp = buf;
|
||||||
for (i = 0, q = s; i < 7 && q < end; i++) {
|
for (i = 0, q = s; i < 7 && q < end; i++) {
|
||||||
len = enclen(encode, q);
|
len = enclen(encode, q, end);
|
||||||
while (len-- > 0) *bp++ = *q++;
|
while (len-- > 0) *bp++ = *q++;
|
||||||
}
|
}
|
||||||
if (q < end) { xmemcpy(bp, "...\"", 4); bp += 4; }
|
if (q < end) { xmemcpy(bp, "...\"", 4); bp += 4; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue