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

ruby-changes:8929

From: knu <ko1@a...>
Date: Wed, 3 Dec 2008 16:40:34 +0900 (JST)
Subject: [ruby-changes:8929] Ruby:r20465 (ruby_1_8): * regex.c (re_compile_pattern): Use %ld for pointer differences.

knu	2008-12-03 16:39:37 +0900 (Wed, 03 Dec 2008)

  New Revision: 20465

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

  Log:
    * regex.c (re_compile_pattern): Use %ld for pointer differences.

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/regex.c

Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 20464)
+++ ruby_1_8/ChangeLog	(revision 20465)
@@ -1,3 +1,7 @@
+Wed Dec  3 16:38:11 2008  Akinori MUSHA  <knu@i...>
+
+	* regex.c (re_compile_pattern): Use %ld for pointer differences.
+
 Wed Dec  3 16:25:55 2008  Akinori MUSHA  <knu@i...>
 
 	* pack.c (rb_utf8_to_uv), intern.h: Rename utf8_to_uv to
Index: ruby_1_8/regex.c
===================================================================
--- ruby_1_8/regex.c	(revision 20464)
+++ ruby_1_8/regex.c	(revision 20465)
@@ -1364,8 +1364,8 @@
       /* If there is no previous pattern, char not special. */
       if (!laststart) {
 	snprintf(error_msg, ERROR_MSG_MAX_SIZE, 
-		 "invalid regular expression; there's no previous pattern, to which '%c' would define cardinality at %d", 
-		 c, p-pattern);
+		 "invalid regular expression; there's no previous pattern, to which '%c' would define cardinality at %ld", 
+		 c, (long)(p-pattern));
 	FREE_AND_RETURN(stackb, error_msg);
       }
       /* If there is a sequence of repetition chars,
@@ -2028,8 +2028,8 @@
       /* If there is no previous pattern, this is an invalid pattern.  */
       if (!laststart) {
 	snprintf(error_msg, ERROR_MSG_MAX_SIZE, 
-		 "invalid regular expression; there's no previous pattern, to which '{' would define cardinality at %d", 
-		 p-pattern);
+		 "invalid regular expression; there's no previous pattern, to which '{' would define cardinality at %ld", 
+		 (long)(p-pattern));
 	FREE_AND_RETURN(stackb, error_msg);
       }
       if( p == pend)

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

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