summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-30 17:22:32 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-30 17:22:32 +0000
commitbfeeb913fed701b552cb6c7331b33062b7922de3 (patch)
tree3ece13a5919435e23c119a1b2eddc832857df7ec /io.c
parent11caac16638cce5b5346e80246045897c33b0732 (diff)
* io.c (seek_before_access): fixed argument type.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/io.c b/io.c
index b135f916cf..8a61940824 100644
--- a/io.c
+++ b/io.c
@@ -7911,8 +7911,9 @@ struct seek_arg {
};
static VALUE
-seek_before_access(struct seek_arg *arg)
+seek_before_access(VALUE argp)
{
+ struct seek_arg *arg = (struct seek_arg *)argp;
rb_io_binmode(arg->io);
return rb_io_seek(arg->io, arg->offset, arg->mode);
}
@@ -7964,7 +7965,7 @@ rb_io_s_read(int argc, VALUE *argv, VALUE io)
sarg.io = arg.io;
sarg.offset = offset;
sarg.mode = SEEK_SET;
- rb_protect((VALUE (*)(VALUE))seek_before_access, (VALUE)&sarg, &state);
+ rb_protect(seek_before_access, (VALUE)&sarg, &state);
if (state) {
rb_io_close(arg.io);
rb_jump_tag(state);