aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-11-28 05:56:39 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-11-28 05:56:39 +0000
commitbc8b1008731e5aadca308c464b184066e2856e76 (patch)
treee985f08af91e18051d46ba624fd8fa40344ed8c4
parentf0445d156caf032135777f4c3974a4adc945470e (diff)
downloadruby-bc8b1008731e5aadca308c464b184066e2856e76.tar.gz
* 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
-rw-r--r--ChangeLog4
-rw-r--r--io.c11
2 files changed, 9 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 88a255dca2..9c5323dc2e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
* thread_win32.c (gvl_release, gvl_init): suppress warnings.
diff --git a/io.c b/io.c
index 8e1f1b826e..26af3ce6ef 100644
--- a/io.c
+++ b/io.c
@@ -145,13 +145,12 @@ struct timeval rb_time_interval(VALUE);
struct argf {
VALUE filename, current_file;
- int last_lineno; /* $. */
- int lineno;
- int init_p, next_p;
+ long last_lineno; /* $. */
+ long lineno;
VALUE argv;
char *inplace;
- int binmode;
struct rb_io_enc_t encs;
+ char init_p, next_p, binmode;
};
static int max_file_descriptor = NOFILE;
@@ -6945,7 +6944,7 @@ static VALUE
argf_getline(int argc, VALUE *argv, VALUE argf)
{
VALUE line;
- int lineno = ARGF.lineno;
+ long lineno = ARGF.lineno;
retry:
if (!next_argv()) return Qnil;
@@ -7176,7 +7175,7 @@ rb_f_readlines(int argc, VALUE *argv, VALUE recv)
static VALUE
argf_readlines(int argc, VALUE *argv, VALUE argf)
{
- int lineno = ARGF.lineno;
+ long lineno = ARGF.lineno;
VALUE lines, ary;
ary = rb_ary_new();