From 9b58e8454a9f5f24a454e0d0a3f8dc56e214f67e Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 17 Jan 2010 05:24:36 +0000 Subject: [PATCH] * ext/iconv/iconv.c (rb_str_derive): use long. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 +++- ext/iconv/iconv.c | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 33064de568..93a705c628 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,6 @@ -Sun Jan 17 14:23:23 2010 Nobuyoshi Nakada +Sun Jan 17 14:24:35 2010 Nobuyoshi Nakada + + * ext/iconv/iconv.c (rb_str_derive): use long. * ext/iconv/iconv.c (iconv_convert): suppress a warning. diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index cf77ee3e2c..c1d59c5fc6 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -115,7 +115,7 @@ static iconv_t iconv_create _((VALUE to, VALUE from, struct rb_iconv_opt_t *opt, static void iconv_dfree _((void *cd)); static VALUE iconv_free _((VALUE cd)); static VALUE iconv_try _((iconv_t cd, const char **inptr, size_t *inlen, char **outptr, size_t *outlen)); -static VALUE rb_str_derive _((VALUE str, const char* ptr, int len)); +static VALUE rb_str_derive _((VALUE str, const char* ptr, long len)); static VALUE iconv_convert _((iconv_t cd, VALUE str, long start, long length, int toidx, struct iconv_env_t* env)); static VALUE iconv_s_allocate _((VALUE klass)); @@ -386,7 +386,7 @@ iconv_fail_retry(VALUE error, VALUE success, VALUE failed, struct iconv_env_t* e } static VALUE -rb_str_derive(VALUE str, const char* ptr, int len) +rb_str_derive(VALUE str, const char* ptr, long len) { VALUE ret; @@ -442,7 +442,7 @@ iconv_convert(iconv_t cd, VALUE str, long start, long length, int toidx, struct length = 0; } else { - int slen; + long slen; StringValue(str); slen = RSTRING_LEN(str);