diff options
| author | bors <bors@rust-lang.org> | 2013-11-13 12:21:28 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-11-13 12:21:28 -0800 |
| commit | a79ed57beb759bf1753d80a801756d82bea7ec10 (patch) | |
| tree | 3983a5b78ef7001978e066fc7ff0c6a0e7495ffd /src/rustllvm/RustWrapper.cpp | |
| parent | 314d6f693f9442ab40879b58f34c6d0afb76f447 (diff) | |
| parent | c2c7a2497d2005f92834a2c2d6204cc7db783ec9 (diff) | |
| download | rust-a79ed57beb759bf1753d80a801756d82bea7ec10.tar.gz rust-a79ed57beb759bf1753d80a801756d82bea7ec10.zip | |
auto merge of #10451 : zkamsler/rust/buf_writer, r=alexcrichton
I implemented BufWriter. I realize the use of conditions are on their way out for IO, but it does raise a condition if a write will not fit in the buffer for now. I also replaced the seek code for MemWriter. It was adding the offset as a uint, which is unsound for negative offsets. It only happened to work because unsigned addition performs the same operation with two's complement, and sizeof(uint) <= sizeof(i64) so there was no (lack of) sign extension. I replaced this with computing an offset as an i64 and clamping to zero. I don't expect anyone will have use BufWriter with a byte buffer greater than 2^63 bytes any time soon. @alexcrichton Closes #10433
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
