diff options
| author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-03 07:39:37 +0000 |
|---|---|---|
| committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-03 07:39:37 +0000 |
| commit | dc21e636eb63d0fb688d7e068c4b82ccb64cd9af (patch) | |
| tree | b2d508a3513b3529d7c4987f694b197036fa8b7d | |
| parent | 1e5c02ddd5e7444128572d960bd4bdd3bf41474c (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-- | ChangeLog | 4 | ||||
| -rw-r--r-- | regex.c | 8 |
2 files changed, 8 insertions, 4 deletions
@@ -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 @@ -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) |
