summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-03 07:39:37 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-03 07:39:37 +0000
commitdc21e636eb63d0fb688d7e068c4b82ccb64cd9af (patch)
treeb2d508a3513b3529d7c4987f694b197036fa8b7d
parent1e5c02ddd5e7444128572d960bd4bdd3bf41474c (diff)
* regex.c (re_compile_pattern): Use %ld for pointer differences.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@20465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--regex.c8
2 files changed, 8 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 9e49248967..1a9f6f8e60 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Wed Dec 3 16:38:11 2008 Akinori MUSHA <knu@iDaemons.org>
+
+ * regex.c (re_compile_pattern): Use %ld for pointer differences.
+
Wed Dec 3 16:25:55 2008 Akinori MUSHA <knu@iDaemons.org>
* pack.c (rb_utf8_to_uv), intern.h: Rename utf8_to_uv to
diff --git a/regex.c b/regex.c
index 06f982e7c7..968c5efca2 100644
--- a/regex.c
+++ b/regex.c
@@ -1364,8 +1364,8 @@ re_compile_pattern(pattern, size, bufp)
/* 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 @@ re_compile_pattern(pattern, size, bufp)
/* 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)