summaryrefslogtreecommitdiff
path: root/regerror.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-30 02:08:54 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-30 02:08:54 (GMT)
commit23a32d6444cea5b1719edc42d63911e108d3086e (patch)
treeccbb65883a860cf72c3427345134b8edafe735c0 /regerror.c
parent88ca298efbb004600e1853cef872038f78843252 (diff)
* include/ruby/oniguruma.h, include/ruby/re.h, re.c, regcomp.c,
regenc.c, regerror.c, regexec.c, regint.h, regparse.c: use long. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'regerror.c')
-rw-r--r--regerror.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/regerror.c b/regerror.c
index 0a92c67..eb67138 100644
--- a/regerror.c
+++ b/regerror.c
@@ -232,7 +232,7 @@ static int to_ascii(OnigEncoding enc, UChar *s, UChar *end,
*is_over = ((p < end) ? 1 : 0);
}
else {
- len = MIN((end - s), buf_size);
+ len = (int)MIN((end - s), buf_size);
xmemcpy(buf, s, (size_t )len);
*is_over = ((buf_size < (end - s)) ? 1 : 0);
}
@@ -256,7 +256,8 @@ onig_error_code_to_str(s, code, va_alist)
{
UChar *p, *q;
OnigErrorInfo* einfo;
- int len, is_over;
+ size_t len;
+ int is_over;
UChar parbuf[MAX_ERROR_PAR_LEN];
va_list vargs;
@@ -327,7 +328,8 @@ onig_snprintf_with_pattern(buf, bufsize, enc, pat, pat_end, fmt, va_alist)
va_dcl
#endif
{
- int n, need, len;
+ size_t need;
+ int n, len;
UChar *p, *s, *bp;
UChar bs[6];
va_list args;