| author | |
| committer | |
| log | 59a501a9ac36a46fe4baa5d7245c3d64b0e13394 |
| tree | d18087138f70700385550271185082fd2ae07f8a |
| parent | 43d019d3e0448e9556650d883ade1c6e92c91ff1 |
| parent | 78093ce4c8a0a9d9dbf2679335e02636748c39c9 |
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/370702 files changed, 3 insertions(+), 4 deletions(-)
lib/std/Io/Threaded.zig+1-1| ... | @@ -12910,7 +12910,7 @@ fn netReadPosix(fd: net.Socket.Handle, data: [][]u8, control: []u8) net.Stream.R | ... | @@ -12910,7 +12910,7 @@ fn netReadPosix(fd: net.Socket.Handle, data: [][]u8, control: []u8) net.Stream.R |
| 12910 | switch (std.os.wasi.fd_read(fd, dest.ptr, dest.len, &n)) { | 12910 | switch (std.os.wasi.fd_read(fd, dest.ptr, dest.len, &n)) { |
| 12911 | .SUCCESS => { | 12911 | .SUCCESS => { |
| 12912 | syscall.finish(); | 12912 | syscall.finish(); |
| 12913 | return n; | 12913 | return .{ .data_len = n }; |
| 12914 | }, | 12914 | }, |
| 12915 | .INTR => { | 12915 | .INTR => { |
| 12916 | try syscall.checkCancel(); | 12916 | try syscall.checkCancel(); |
lib/std/Io/net.zig+2-3| ... | @@ -1283,11 +1283,10 @@ pub const Stream = struct { | ... | @@ -1283,11 +1283,10 @@ pub const Stream = struct { |
| 1283 | /// This is a low-level API that calls the `Io` interface function directly. | 1283 | /// This is a low-level API that calls the `Io` interface function directly. |
| 1284 | /// For a higher level API, see `reader`. | 1284 | /// For a higher level API, see `reader`. |
| 1285 | pub fn read(s: *const Stream, io: Io, data: [][]u8) Reader.Error!usize { | 1285 | pub fn read(s: *const Stream, io: Io, data: [][]u8) Reader.Error!usize { |
| 1286 | const rc, _ = try (try io.operate(.{ .net_read = .{ | 1286 | return (try (try io.operate(.{ .net_read = .{ |
| 1287 | .socket_handle = s.socket.handle, | 1287 | .socket_handle = s.socket.handle, |
| 1288 | .data = data, | 1288 | .data = data, |
| 1289 | } })).net_read; | 1289 | } })).net_read).data_len; |
| 1290 | return rc; | ||
| 1291 | } | 1290 | } |
| 1292 | 1291 | ||
| 1293 | /// Read with control data. | 1292 | /// Read with control data. |