diff options
author | Vijay Vasudevan <vrv@google.com> | 2016-06-16 18:04:10 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2016-06-16 19:16:41 -0700 |
commit | 209c006578483460e98c114a69d4b9ed6b95efed (patch) | |
tree | 0d0fa06e6472beea7291a2ea7bedc562e0a7f6dc /tensorflow/core/util/tensor_slice_writer.cc | |
parent | 92753d80cf09efd6e9b9156e7ad08b3203214cec (diff) |
TensorFlow: minor change functions in Env interface.
Switches to return a std::unique_ptr<> to convey transfer of ownership.
Keeps existing functions temporarily for backwards compatibility.
Change file_system.h interface to switch entirely to the new interface,
change all callers. If this breaks someone in the public, the interface
change should be straightforward.
Change: 125127028
Diffstat (limited to 'tensorflow/core/util/tensor_slice_writer.cc')
-rw-r--r-- | tensorflow/core/util/tensor_slice_writer.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/core/util/tensor_slice_writer.cc b/tensorflow/core/util/tensor_slice_writer.cc index 74fcbbe649..bef421e8cf 100644 --- a/tensorflow/core/util/tensor_slice_writer.cc +++ b/tensorflow/core/util/tensor_slice_writer.cc @@ -68,10 +68,10 @@ class TableBuilder : public TensorSliceWriter::Builder { Status CreateTableTensorSliceBuilder(const string& name, TensorSliceWriter::Builder** builder) { *builder = nullptr; - WritableFile* f; + std::unique_ptr<WritableFile> f; Status s = Env::Default()->NewWritableFile(name, &f); if (s.ok()) { - *builder = new TableBuilder(name, f); + *builder = new TableBuilder(name, f.release()); return Status::OK(); } else { return s; |