| author | |
| committer | |
| log | a90f07b5374723ff76ed2ea888e5515326650e64 |
| tree | c4d0ff459d939890195f0db4e480159baf889440 |
| parent | cf28736f0d9f70c801a3cc30293a98067bc96fa0 |
5 files changed, 20 insertions(+), 19 deletions(-)
lib/std/crypto/siphash.zig+3-3| ... | @@ -249,7 +249,7 @@ fn SipHash(comptime T: type, comptime c_rounds: usize, comptime d_rounds: usize) | ... | @@ -249,7 +249,7 @@ fn SipHash(comptime T: type, comptime c_rounds: usize, comptime d_rounds: usize) |
| 249 | }; | 249 | }; |
| 250 | } | 250 | } |
| 251 | 251 | ||
| 252 | fn writeSplat(ctx: ?*anyopaque, data: []const []const u8, splat: usize) anyerror!usize { | 252 | fn writeSplat(ctx: ?*anyopaque, data: []const []const u8, splat: usize) std.io.Writer.Error!usize { |
| 253 | const self: *Self = @alignCast(@ptrCast(ctx)); | 253 | const self: *Self = @alignCast(@ptrCast(ctx)); |
| 254 | var len: usize = 0; | 254 | var len: usize = 0; |
| 255 | for (data[0 .. data.len - 1]) |slice| { | 255 | for (data[0 .. data.len - 1]) |slice| { |
| ... | @@ -271,14 +271,14 @@ fn SipHash(comptime T: type, comptime c_rounds: usize, comptime d_rounds: usize) | ... | @@ -271,14 +271,14 @@ fn SipHash(comptime T: type, comptime c_rounds: usize, comptime d_rounds: usize) |
| 271 | limit: std.io.Writer.Limit, | 271 | limit: std.io.Writer.Limit, |
| 272 | headers_and_trailers: []const []const u8, | 272 | headers_and_trailers: []const []const u8, |
| 273 | headers_len: usize, | 273 | headers_len: usize, |
| 274 | ) anyerror!usize { | 274 | ) std.io.Writer.Error!usize { |
| 275 | _ = ctx; | 275 | _ = ctx; |
| 276 | _ = file; | 276 | _ = file; |
| 277 | _ = offset; | 277 | _ = offset; |
| 278 | _ = limit; | 278 | _ = limit; |
| 279 | _ = headers_and_trailers; | 279 | _ = headers_and_trailers; |
| 280 | _ = headers_len; | 280 | _ = headers_len; |
| 281 | return error.Unimplemented; | 281 | @panic("TODO"); |
| 282 | } | 282 | } |
| 283 | }; | 283 | }; |
| 284 | } | 284 | } |
src/link/Coff.zig+5-2| ... | @@ -3097,8 +3097,11 @@ const ImportTable = struct { | ... | @@ -3097,8 +3097,11 @@ const ImportTable = struct { |
| 3097 | fn pwriteAll(coff: *Coff, bytes: []const u8, offset: u64) error{LinkFailure}!void { | 3097 | fn pwriteAll(coff: *Coff, bytes: []const u8, offset: u64) error{LinkFailure}!void { |
| 3098 | const comp = coff.base.comp; | 3098 | const comp = coff.base.comp; |
| 3099 | const diags = &comp.link_diags; | 3099 | const diags = &comp.link_diags; |
| 3100 | coff.base.file.?.pwriteAll(bytes, offset) catch |err| { | 3100 | var fw = coff.base.file.?.writer(); |
| 3101 | return diags.fail("failed to write: {s}", .{@errorName(err)}); | 3101 | fw.pos = offset; |
| 3102 | var bw = fw.interface().unbuffered(); | ||
| 3103 | bw.writeAll(bytes) catch |err| switch (err) { | ||
| 3104 | error.WriteFailed => return diags.fail("failed to write: {s}", .{@errorName(fw.err.?)}), | ||
| 3102 | }; | 3105 | }; |
| 3103 | } | 3106 | } |
| 3104 | 3107 |
src/link/Elf.zig+5-2| ... | @@ -4454,8 +4454,11 @@ pub fn stringTableLookup(strtab: []const u8, off: u32) [:0]const u8 { | ... | @@ -4454,8 +4454,11 @@ pub fn stringTableLookup(strtab: []const u8, off: u32) [:0]const u8 { |
| 4454 | pub fn pwriteAll(elf_file: *Elf, bytes: []const u8, offset: u64) error{LinkFailure}!void { | 4454 | pub fn pwriteAll(elf_file: *Elf, bytes: []const u8, offset: u64) error{LinkFailure}!void { |
| 4455 | const comp = elf_file.base.comp; | 4455 | const comp = elf_file.base.comp; |
| 4456 | const diags = &comp.link_diags; | 4456 | const diags = &comp.link_diags; |
| 4457 | elf_file.base.file.?.pwriteAll(bytes, offset) catch |err| { | 4457 | var fw = elf_file.base.file.?.writer(); |
| 4458 | return diags.fail("failed to write: {s}", .{@errorName(err)}); | 4458 | fw.pos = offset; |
| 4459 | var bw = fw.interface().unbuffered(); | ||
| 4460 | bw.writeAll(bytes) catch |err| switch (err) { | ||
| 4461 | error.WriteFailed => return diags.fail("failed to write: {s}", .{@errorName(fw.err.?)}), | ||
| 4459 | }; | 4462 | }; |
| 4460 | } | 4463 | } |
| 4461 | 4464 |
src/link/MachO.zig+5-2| ... | @@ -5330,8 +5330,11 @@ fn isReachable(atom: *const Atom, rel: Relocation, macho_file: *MachO) bool { | ... | @@ -5330,8 +5330,11 @@ fn isReachable(atom: *const Atom, rel: Relocation, macho_file: *MachO) bool { |
| 5330 | pub fn pwriteAll(macho_file: *MachO, bytes: []const u8, offset: u64) error{LinkFailure}!void { | 5330 | pub fn pwriteAll(macho_file: *MachO, bytes: []const u8, offset: u64) error{LinkFailure}!void { |
| 5331 | const comp = macho_file.base.comp; | 5331 | const comp = macho_file.base.comp; |
| 5332 | const diags = &comp.link_diags; | 5332 | const diags = &comp.link_diags; |
| 5333 | macho_file.base.file.?.pwriteAll(bytes, offset) catch |err| { | 5333 | var fw = macho_file.base.file.?.writer(); |
| 5334 | return diags.fail("failed to write: {s}", .{@errorName(err)}); | 5334 | fw.pos = offset; |
| 5335 | var bw = fw.interface().unbuffered(); | ||
| 5336 | bw.writeAll(bytes) catch |err| switch (err) { | ||
| 5337 | error.WriteFailed => return diags.fail("failed to write: {s}", .{@errorName(fw.err.?)}), | ||
| 5335 | }; | 5338 | }; |
| 5336 | } | 5339 | } |
| 5337 | 5340 |
src/main.zig+2-10| ... | @@ -5011,11 +5011,7 @@ fn cmdBuild(gpa: Allocator, arena: Allocator, args: []const []const u8) !void { | ... | @@ -5011,11 +5011,7 @@ fn cmdBuild(gpa: Allocator, arena: Allocator, args: []const []const u8) !void { |
| 5011 | var http_client: if (dev.env.supports(.fetch_command)) std.http.Client else struct { | 5011 | var http_client: if (dev.env.supports(.fetch_command)) std.http.Client else struct { |
| 5012 | allocator: Allocator, | 5012 | allocator: Allocator, |
| 5013 | fn deinit(_: @This()) void {} | 5013 | fn deinit(_: @This()) void {} |
| 5014 | } = .{ | 5014 | } = .{ .allocator = gpa }; |
| 5015 | .allocator = gpa, | ||
| 5016 | .read_buffer_size = 0x4000, | ||
| 5017 | .write_buffer_size = 0x4000, | ||
| 5018 | }; | ||
| 5019 | defer http_client.deinit(); | 5015 | defer http_client.deinit(); |
| 5020 | 5016 | ||
| 5021 | var unlazy_set: Package.Fetch.JobQueue.UnlazySet = .{}; | 5017 | var unlazy_set: Package.Fetch.JobQueue.UnlazySet = .{}; |
| ... | @@ -6823,11 +6819,7 @@ fn cmdFetch( | ... | @@ -6823,11 +6819,7 @@ fn cmdFetch( |
| 6823 | try thread_pool.init(.{ .allocator = gpa }); | 6819 | try thread_pool.init(.{ .allocator = gpa }); |
| 6824 | defer thread_pool.deinit(); | 6820 | defer thread_pool.deinit(); |
| 6825 | 6821 | ||
| 6826 | var http_client: std.http.Client = .{ | 6822 | var http_client: std.http.Client = .{ .allocator = gpa }; |
| 6827 | .allocator = gpa, | ||
| 6828 | .read_buffer_size = 0x4000, | ||
| 6829 | .write_buffer_size = 0x4000, | ||
| 6830 | }; | ||
| 6831 | defer http_client.deinit(); | 6823 | defer http_client.deinit(); |
| 6832 | 6824 | ||
| 6833 | try http_client.initDefaultProxies(arena); | 6825 | try http_client.initDefaultProxies(arena); |