summaryrefslogtreecommitdiff
path: root/regparse.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-11 00:48:35 (GMT)
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-11 00:48:35 (GMT)
commitc506f190e142ad8cda2be386180c51d428a937fc (patch)
treec52bde6924eaa562e434a01ef2cdc83b06e8bd8b /regparse.c
parent2503de61fc96c932c4172d7c4b48d2dded5679e6 (diff)
* regerror.c (onig_vsnprintf_with_pattern): added.
* regparse.c (onig_syntax_warn): use above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'regparse.c')
-rw-r--r--regparse.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/regparse.c b/regparse.c
index 8bd89e1..0a6bf19 100644
--- a/regparse.c
+++ b/regparse.c
@@ -2844,20 +2844,23 @@ fetch_name(OnigCodePoint start_code, UChar** src, UChar* end,
}
#endif /* USE_NAMED_GROUP */
+void onig_vsnprintf_with_pattern(UChar buf[], int bufsize, OnigEncoding enc,
+ UChar* pat, UChar* pat_end, const UChar *fmt, va_list args);
+
static void
onig_syntax_warn(ScanEnv *env, const char *fmt, ...)
{
va_list args;
UChar buf[WARN_BUFSIZE];
va_start(args, fmt);
- onig_snprintf_with_pattern(buf, WARN_BUFSIZE, env->enc,
+ onig_vsnprintf_with_pattern(buf, WARN_BUFSIZE, env->enc,
env->pattern, env->pattern_end,
(const UChar *)fmt, args);
va_end(args);
if (env->sourcefile == NULL)
- rb_warn(fmt, buf);
+ rb_warn((char *)buf);
else
- rb_compile_warn(env->sourcefile, env->sourceline, fmt, buf);
+ rb_compile_warn(env->sourcefile, env->sourceline, (char *)buf);
}
static void