diff options
author | John Langford <jl@hunch.net> | 2014-01-23 19:43:09 +0400 |
---|---|---|
committer | John Langford <jl@hunch.net> | 2014-01-23 19:43:09 +0400 |
commit | f9a6b9bd2f40abf378481ae6ca92966dfdae2d5e (patch) | |
tree | bec1fcf318c70d61fed8955a4482bf43aadbf177 /vowpalwabbit/parser.cc | |
parent | 238040fb9f5cfd408ea97c4349e8df005481241a (diff) | |
parent | cb8d90352a0007c8b133f535ad0f9111c7a58cee (diff) |
reconcile
Diffstat (limited to 'vowpalwabbit/parser.cc')
-rw-r--r-- | vowpalwabbit/parser.cc | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/vowpalwabbit/parser.cc b/vowpalwabbit/parser.cc index 6bee8cce..2c55f0f9 100644 --- a/vowpalwabbit/parser.cc +++ b/vowpalwabbit/parser.cc @@ -239,11 +239,7 @@ void reset_source(vw& all, size_t numbits) { int fd = input->files.pop(); if (!member(all.final_prediction_sink, (size_t) fd)) -#ifdef _WIN32 - _close(fd); -#else - close(fd); -#endif + io_buf::close_file_or_socket(fd); } input->open_file(all.p->output->finalname.begin, all.stdin_off, io_buf::READ); //pushing is merged into open_file all.p->reader = read_cached_features; @@ -259,11 +255,7 @@ void reset_source(vw& all, size_t numbits) mutex_unlock(&all.p->output_lock); // close socket, erase final prediction sink and socket -#ifdef _WIN32 - _close(all.p->input->files[0]); -#else - close(all.p->input->files[0]); -#endif + io_buf::close_file_or_socket(all.p->input->files[0]); all.final_prediction_sink.erase(); all.p->input->files.erase(); |