summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-04-12 14:03:46 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-04-12 14:03:46 +0000
commit48667901a5b82d18776828393280b73450aa1f9e (patch)
tree69f3c49fa2fb53619943ca75f5d86c108b988488 /io.c
parentea258b3616e5a7038fa1a158287b21db84f365c4 (diff)
merges r22902 from trunk into ruby_1_9_1.
-- * io.c (copy_stream_fallback_body): off_t may be larger than long. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/io.c b/io.c
index e3b6281562..a043573a69 100644
--- a/io.c
+++ b/io.c
@@ -7616,7 +7616,7 @@ copy_stream_fallback_body(VALUE arg)
const int buflen = 16*1024;
VALUE n;
VALUE buf = rb_str_buf_new(buflen);
- long rest = stp->copy_length;
+ off_t rest = stp->copy_length;
off_t off = stp->src_offset;
ID read_method = id_readpartial;
@@ -7635,7 +7635,7 @@ copy_stream_fallback_body(VALUE arg)
else {
if (rest == 0)
break;
- l = buflen < rest ? buflen : rest;
+ l = buflen < rest ? buflen : (long)rest;
}
if (stp->src_fd == -1) {
rb_funcall(stp->src, read_method, 2, INT2FIX(l), buf);