diff options
| author | ksss <[email protected]> | 2017-06-11 23:05:58 +0900 |
|---|---|---|
| committer | ksss <[email protected]> | 2017-06-11 23:22:04 +0900 |
| commit | 27f422880fa501a16642e0499b8140c074b5269b (patch) | |
| tree | 97d5ac017100368221c436c906011b79578d44fc /src | |
| parent | 3a73a5849388fe908af7131804f9fc7f55472651 (diff) | |
| download | mruby-27f422880fa501a16642e0499b8140c074b5269b.tar.gz mruby-27f422880fa501a16642e0499b8140c074b5269b.zip | |
To accurate `pos`
pos shouldn't cache because it's not controllable
Diffstat (limited to 'src')
| -rw-r--r-- | src/io.c | 4 |
1 files changed, 0 insertions, 4 deletions
@@ -389,7 +389,6 @@ mrb_io_s_popen(mrb_state *mrb, mrb_value klass) } mrb_iv_set(mrb, io, mrb_intern_cstr(mrb, "@buf"), mrb_str_new_cstr(mrb, "")); - mrb_iv_set(mrb, io, mrb_intern_cstr(mrb, "@pos"), mrb_fixnum_value(0)); fptr = mrb_io_alloc(mrb); fptr->fd = fd; @@ -443,7 +442,6 @@ mrb_io_initialize(mrb_state *mrb, mrb_value io) flags = mrb_io_modestr_to_flags(mrb, mrb_string_value_cstr(mrb, &mode)); mrb_iv_set(mrb, io, mrb_intern_cstr(mrb, "@buf"), mrb_str_new_cstr(mrb, "")); - mrb_iv_set(mrb, io, mrb_intern_cstr(mrb, "@pos"), mrb_fixnum_value(0)); fptr = (struct mrb_io *)DATA_PTR(io); if (fptr != NULL) { @@ -801,7 +799,6 @@ mrb_io_s_pipe(mrb_state *mrb, mrb_value klass) r = mrb_obj_value(mrb_data_object_alloc(mrb, mrb_class_ptr(klass), NULL, &mrb_io_type)); mrb_iv_set(mrb, r, mrb_intern_cstr(mrb, "@buf"), mrb_str_new_cstr(mrb, "")); - mrb_iv_set(mrb, r, mrb_intern_cstr(mrb, "@pos"), mrb_fixnum_value(0)); fptr_r = mrb_io_alloc(mrb); fptr_r->fd = pipes[0]; fptr_r->readable = 1; @@ -812,7 +809,6 @@ mrb_io_s_pipe(mrb_state *mrb, mrb_value klass) w = mrb_obj_value(mrb_data_object_alloc(mrb, mrb_class_ptr(klass), NULL, &mrb_io_type)); mrb_iv_set(mrb, w, mrb_intern_cstr(mrb, "@buf"), mrb_str_new_cstr(mrb, "")); - mrb_iv_set(mrb, w, mrb_intern_cstr(mrb, "@pos"), mrb_fixnum_value(0)); fptr_w = mrb_io_alloc(mrb); fptr_w->fd = pipes[1]; fptr_w->readable = 0; |
