aboutsummaryrefslogtreecommitdiff
path: root/std/io/seekable_stream.zig
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2019-04-28 17:06:20 +0200
committerLemonBoy <thatlemon@gmail.com>2019-04-28 18:07:40 +0200
commitfbcc559cdbe67b711ea24a152aa7bb3a10bb06c7 (patch)
treefcbad1d82f4f9dbf1d7d4e9d756d84e9d89a9a04 /std/io/seekable_stream.zig
parent205e501e42b9a2e1d35afa0873311165100863ae (diff)
downloadzig-fbcc559cdbe67b711ea24a152aa7bb3a10bb06c7.tar.gz
zig-fbcc559cdbe67b711ea24a152aa7bb3a10bb06c7.zip
Make io offsets/sizes u64 instead of usize
Decouple the concepts of address-space size and file size. Closes #637
Diffstat (limited to 'std/io/seekable_stream.zig')
-rw-r--r--std/io/seekable_stream.zig16
1 files changed, 8 insertions, 8 deletions
diff --git a/std/io/seekable_stream.zig b/std/io/seekable_stream.zig
index 5529e42ff1..baf479891c 100644
--- a/std/io/seekable_stream.zig
+++ b/std/io/seekable_stream.zig
@@ -7,25 +7,25 @@ pub fn SeekableStream(comptime SeekErrorType: type, comptime GetSeekPosErrorType
pub const SeekError = SeekErrorType;
pub const GetSeekPosError = GetSeekPosErrorType;
- seekToFn: fn (self: *Self, pos: usize) SeekError!void,
- seekForwardFn: fn (self: *Self, pos: isize) SeekError!void,
+ seekToFn: fn (self: *Self, pos: u64) SeekError!void,
+ seekForwardFn: fn (self: *Self, pos: i64) SeekError!void,
- getPosFn: fn (self: *Self) GetSeekPosError!usize,
- getEndPosFn: fn (self: *Self) GetSeekPosError!usize,
+ getPosFn: fn (self: *Self) GetSeekPosError!u64,
+ getEndPosFn: fn (self: *Self) GetSeekPosError!u64,
- pub fn seekTo(self: *Self, pos: usize) SeekError!void {
+ pub fn seekTo(self: *Self, pos: u64) SeekError!void {
return self.seekToFn(self, pos);
}
- pub fn seekForward(self: *Self, amt: isize) SeekError!void {
+ pub fn seekForward(self: *Self, amt: i64) SeekError!void {
return self.seekForwardFn(self, amt);
}
- pub fn getEndPos(self: *Self) GetSeekPosError!usize {
+ pub fn getEndPos(self: *Self) GetSeekPosError!u64 {
return self.getEndPosFn(self);
}
- pub fn getPos(self: *Self) GetSeekPosError!usize {
+ pub fn getPos(self: *Self) GetSeekPosError!u64 {
return self.getPosFn(self);
}
};