authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-06-18 17:43:01-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-06-18 17:43:01-04:00
loga430853a48a5e4dbcd0094c632957e28898159f3
treed1bc116c6608645b376eb486ee8bf81bd09bfb38
parent1aafbae5be518309b4c2194cdc24e22642514519

standard library fixes


3 files changed, 3 insertions(+), 3 deletions(-)

src/ir.cpp+1-1
......@@ -10215,7 +10215,7 @@ static IrInstruction *ir_analyze_cast(IrAnalyze *ira, IrInstruction *source_inst
1021510215 }
1021610216 }
1021710217
10218 // explicit cast from [N]T to &const []const N
10218 // explicit cast from [N]T to &const []const T
1021910219 if (wanted_type->id == TypeTableEntryIdPointer &&
1022010220 wanted_type->data.pointer.is_const &&
1022110221 is_slice(wanted_type->data.pointer.child_type) &&
std/cstr.zig+1-1
......@@ -79,7 +79,7 @@ pub const NullTerminated2DArray = struct {
7979 errdefer allocator.free(buf);
8080
8181 var write_index = index_size;
82 const index_buf = ([]?[*]u8)(buf);
82 const index_buf = @bytesToSlice(?[*]u8, buf);
8383
8484 var i: usize = 0;
8585 for (slices) |slice| {
std/os/index.zig+1-1
......@@ -1805,7 +1805,7 @@ pub fn argsAlloc(allocator: *mem.Allocator) ![]const []u8 {
18051805 const buf = try allocator.alignedAlloc(u8, @alignOf([]u8), total_bytes);
18061806 errdefer allocator.free(buf);
18071807
1808 const result_slice_list = ([][]u8)(buf[0..slice_list_bytes]);
1808 const result_slice_list = @bytesToSlice([]u8, buf[0..slice_list_bytes]);
18091809 const result_contents = buf[slice_list_bytes..];
18101810 mem.copy(u8, result_contents, contents_slice);
18111811