diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-12-18 17:24:52 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-12-18 17:24:52 -0500 |
| commit | 37b13bf1512d8eed7308a2194c1935d91a33796c (patch) | |
| tree | 42b6d1d4b6ddd16c7f69c4bdd15677a720609cf3 /std/cstr.zig | |
| parent | e50ced44a2cf6268c19df901ad56b367d8d802fe (diff) | |
| download | zig-37b13bf1512d8eed7308a2194c1935d91a33796c.tar.gz zig-37b13bf1512d8eed7308a2194c1935d91a33796c.zip | |
hello.zig working with all structs anonymous
Diffstat (limited to 'std/cstr.zig')
| -rw-r--r-- | std/cstr.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/std/cstr.zig b/std/cstr.zig index afe8d5b404..ce847a5fbc 100644 --- a/std/cstr.zig +++ b/std/cstr.zig @@ -34,7 +34,7 @@ pub fn toSlice(str: &u8) -> []u8 { /// A buffer that allocates memory and maintains a null byte at the end. -pub struct CBuf { +pub const CBuf = struct { list: List(u8), /// Must deinitialize with deinit. @@ -124,7 +124,7 @@ pub struct CBuf { pub fn startsWithCStr(self: &const CBuf, s: &const u8) -> bool { self.startsWithMem(s[0...strlen(s)]) } -} +}; fn testSimpleCBuf() { @setFnTest(this, true); |
