1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* io.c (seek_before_access): renamed. see [ruby-core:29861].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-04-29 02:20:58 +00:00
parent e1c34852dc
commit 55181301ae
2 changed files with 5 additions and 3 deletions

View file

@ -1,4 +1,6 @@
Thu Apr 29 11:17:08 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
Thu Apr 29 11:20:53 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* io.c (seek_before_access): renamed. see [ruby-core:29861].
* io.c (rb_io_s_binread): fixed rdoc. parts of a patch from Roger
Pack in [ruby-core:29861].

4
io.c
View file

@ -7911,7 +7911,7 @@ struct seek_arg {
};
static VALUE
seek_before_read(struct seek_arg *arg)
seek_before_access(struct seek_arg *arg)
{
rb_io_binmode(arg->io);
return rb_io_seek(arg->io, arg->offset, arg->mode);
@ -7964,7 +7964,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_read, (VALUE)&sarg, &state);
rb_protect((VALUE (*)(VALUE))seek_before_access, (VALUE)&sarg, &state);
if (state) {
rb_io_close(arg.io);
rb_jump_tag(state);