1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
knu 2008-12-03 07:39:37 +00:00
parent 1e5c02ddd5
commit dc21e636eb
2 changed files with 8 additions and 4 deletions

View file

@ -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

View file

@ -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)