[前][次][番号順一覧][スレッド一覧]

ruby-changes:16644

From: naruse <ko1@a...>
Date: Wed, 14 Jul 2010 18:22:54 +0900 (JST)
Subject: [ruby-changes:16644] Ruby:r28637 (trunk): * regexec.c (match_at): add end point to enclen's argument.

naruse	2010-07-14 18:22:39 +0900 (Wed, 14 Jul 2010)

  New Revision: 28637

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=28637

  Log:
    * regexec.c (match_at): add end point to enclen's argument.
      This only effect on compilinig with -DONIG_DEBUG_MATCH.

  Modified files:
    trunk/ChangeLog
    trunk/regexec.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 28636)
+++ ChangeLog	(revision 28637)
@@ -1,3 +1,8 @@
+Wed Jul 14 18:18:05 2010  NARUSE, Yui  <naruse@r...>
+
+	* regexec.c (match_at): add end point to enclen's argument.
+	  This only effect on compilinig with -DONIG_DEBUG_MATCH.
+
 Tue Jul 13 21:34:17 2010  Nobuyoshi Nakada  <nobu@r...>
 
 	* ext/readline/readline.c: libedit is missing declaration of
Index: regexec.c
===================================================================
--- regexec.c	(revision 28636)
+++ regexec.c	(revision 28637)
@@ -1300,13 +1300,13 @@
   s = (UChar* )sstart;
   while (1) {
 #ifdef ONIG_DEBUG_MATCH
-    {
+    if (s) {
       UChar *q, *bp, buf[50];
       int len;
       fprintf(stderr, "%4d> \"", (int )(s - str));
       bp = buf;
       for (i = 0, q = s; i < 7 && q < end; i++) {
-	len = enclen(encode, q);
+	len = enclen(encode, q, end);
 	while (len-- > 0) *bp++ = *q++;
       }
       if (q < end) { xmemcpy(bp, "...\"", 4); bp += 4; }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]