| author | |
| committer | |
| log | c95791d223efb5113f17568fc9536d4e19a03900 |
| tree | ec2d50d918108e629dc89319c8c7bed8d39e01d9 |
| parent | 751cbb34ca5562ec8c148b4d77707c9c011ad5aa |
2 files changed, 3 insertions(+), 3 deletions(-)
AnyReadable.zig+2-2| ... | ... | @@ -3,8 +3,8 @@ const std = @import("std"); |
| 3 | 3 | const nio = @import("./nio.zig"); |
| 4 | 4 | const AnyReadable = @This(); |
| 5 | 5 | |
| 6 | readFn: *const fn (*anyopaque, []u8) anyerror!usize, | |
| 7 | state: *anyopaque, | |
| 6 | readFn: *const fn (*allowzero anyopaque, []u8) anyerror!usize, | |
| 7 | state: *allowzero anyopaque, | |
| 8 | 8 | |
| 9 | 9 | pub fn read(r: *AnyReadable, buffer: []u8) !usize { |
| 10 | 10 | return r.readFn(r.state, buffer); |
fixed_buffer_stream.zig+1-1| ... | ... | @@ -29,7 +29,7 @@ pub fn FixedBufferStream(comptime Buffer: type) type { |
| 29 | 29 | |
| 30 | 30 | pub fn anyReadable(self: *Self) nio.AnyReadable { |
| 31 | 31 | const S = struct { |
| 32 | fn foo(s: *anyopaque, buffer: []u8) anyerror!usize { | |
| 32 | fn foo(s: *allowzero anyopaque, buffer: []u8) anyerror!usize { | |
| 33 | 33 | const fbs: *Self = @ptrCast(@alignCast(s)); |
| 34 | 34 | return fbs.read(buffer); |
| 35 | 35 | } |