* io.c (struct argf): make lineno long, and reorder members.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-11-28 05:56:39 +00:00
parent f0445d156c
commit bc8b100873
2 changed files with 9 additions and 6 deletions

View File

@ -1,3 +1,7 @@
Sun Nov 28 14:56:32 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* io.c (struct argf): make lineno long, and reorder members.
Sun Nov 28 14:55:42 2010 Nobuyoshi Nakada <nobu@ruby-lang.org> Sun Nov 28 14:55:42 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* thread_win32.c (gvl_release, gvl_init): suppress warnings. * thread_win32.c (gvl_release, gvl_init): suppress warnings.

11
io.c
View File

@ -145,13 +145,12 @@ struct timeval rb_time_interval(VALUE);
struct argf { struct argf {
VALUE filename, current_file; VALUE filename, current_file;
int last_lineno; /* $. */ long last_lineno; /* $. */
int lineno; long lineno;
int init_p, next_p;
VALUE argv; VALUE argv;
char *inplace; char *inplace;
int binmode;
struct rb_io_enc_t encs; struct rb_io_enc_t encs;
char init_p, next_p, binmode;
}; };
static int max_file_descriptor = NOFILE; static int max_file_descriptor = NOFILE;
@ -6945,7 +6944,7 @@ static VALUE
argf_getline(int argc, VALUE *argv, VALUE argf) argf_getline(int argc, VALUE *argv, VALUE argf)
{ {
VALUE line; VALUE line;
int lineno = ARGF.lineno; long lineno = ARGF.lineno;
retry: retry:
if (!next_argv()) return Qnil; if (!next_argv()) return Qnil;
@ -7176,7 +7175,7 @@ rb_f_readlines(int argc, VALUE *argv, VALUE recv)
static VALUE static VALUE
argf_readlines(int argc, VALUE *argv, VALUE argf) argf_readlines(int argc, VALUE *argv, VALUE argf)
{ {
int lineno = ARGF.lineno; long lineno = ARGF.lineno;
VALUE lines, ary; VALUE lines, ary;
ary = rb_ary_new(); ary = rb_ary_new();