diff options
| author | Jimmi Holst Christensen <jimmiholstchristensen@gmail.com> | 2018-11-13 05:08:37 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-13 05:08:37 -0800 |
| commit | 8139c5a516eaa217ed76acdf09496895451c5c5c (patch) | |
| tree | 89841cec818c5650471c7f2c11141013f8640bf7 /std/cstr.zig | |
| parent | 67fbb0434f7104801c66e821b5057a8323e377df (diff) | |
| download | zig-8139c5a516eaa217ed76acdf09496895451c5c5c.tar.gz zig-8139c5a516eaa217ed76acdf09496895451c5c5c.zip | |
New Zig formal grammar (#1685)
Reverted #1628 and changed the grammar+parser of the language to not allow certain expr where types are expected
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 2ddf899b24..a8aaf21279 100644 --- a/std/cstr.zig +++ b/std/cstr.zig @@ -55,7 +55,7 @@ pub fn addNullByte(allocator: *mem.Allocator, slice: []const u8) ![]u8 { return result; } -pub const NullTerminated2DArray = struct.{ +pub const NullTerminated2DArray = struct { allocator: *mem.Allocator, byte_count: usize, ptr: ?[*]?[*]u8, @@ -95,7 +95,7 @@ pub const NullTerminated2DArray = struct.{ } index_buf[i] = null; - return NullTerminated2DArray.{ + return NullTerminated2DArray{ .allocator = allocator, .byte_count = byte_count, .ptr = @ptrCast(?[*]?[*]u8, buf.ptr), |
