aboutsummaryrefslogtreecommitdiff
path: root/std/io.zig
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2016-12-18 17:24:52 -0500
committerAndrew Kelley <superjoe30@gmail.com>2016-12-18 17:24:52 -0500
commit37b13bf1512d8eed7308a2194c1935d91a33796c (patch)
tree42b6d1d4b6ddd16c7f69c4bdd15677a720609cf3 /std/io.zig
parente50ced44a2cf6268c19df901ad56b367d8d802fe (diff)
downloadzig-37b13bf1512d8eed7308a2194c1935d91a33796c.tar.gz
zig-37b13bf1512d8eed7308a2194c1935d91a33796c.zip
hello.zig working with all structs anonymous
Diffstat (limited to 'std/io.zig')
-rw-r--r--std/io.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/std/io.zig b/std/io.zig
index 8fc4a5bc84..887c3cff80 100644
--- a/std/io.zig
+++ b/std/io.zig
@@ -69,7 +69,7 @@ pub const OpenWrite = 0b0010;
pub const OpenCreate = 0b0100;
pub const OpenTruncate = 0b1000;
-pub struct OutStream {
+pub const OutStream = struct {
fd: i32,
buffer: [buffer_size]u8,
index: usize,
@@ -153,11 +153,11 @@ pub struct OutStream {
return;
}
}
-}
+};
// TODO created a BufferedInStream struct and move some of this code there
// BufferedInStream API goes on top of minimal InStream API.
-pub struct InStream {
+pub const InStream = struct {
fd: i32,
/// Call close to clean up.
@@ -360,7 +360,7 @@ pub struct InStream {
return usize(stat.size);
}
-}
+};
pub fn parseUnsigned(inline T: type, buf: []u8, radix: u8) -> %T {
var x: T = 0;