aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-07-18 02:14:55 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-07-18 02:14:55 -0700
commit9c4ab91459a81fab5e2a48c44f402fda0db6744e (patch)
tree9f06cef8abd256d7f5f6ee2db1f61208fac59074
parent9a2bce2102d8a5c124620c2cb9de981a9ff57efd (diff)
downloadbun-9c4ab91459a81fab5e2a48c44f402fda0db6744e.tar.gz
bun-9c4ab91459a81fab5e2a48c44f402fda0db6744e.tar.zst
bun-9c4ab91459a81fab5e2a48c44f402fda0db6744e.zip
Update compress.zigjarred/brotli
-rw-r--r--src/compress.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/compress.zig b/src/compress.zig
index c2470dfa4..89d4d2a7b 100644
--- a/src/compress.zig
+++ b/src/compress.zig
@@ -37,11 +37,11 @@ pub const Controller = struct {
pub fn init(comptime ContextType: type, context: ContextType) Controller {
const Context = std.meta.Child(ContextType);
return Controller{
- .ctx = @ptrCast(*anyopaque, context),
- .closed = @ptrCast(*bool, &context.closed),
- .receive_data_fn = @ptrCast(*const fn (*anyopaque, []const u8, Ownership, Completion) void, &Context.onData),
- .receive_error_fn = @ptrCast(*const fn (*anyopaque, Error) void, &Context.onError),
- .pull_fn = @ptrCast(*const fn (*anyopaque) void, &Context.onPull),
+ .ctx = @as(*anyopaque, @ptrCast(context)),
+ .closed = @as(*bool, @ptrCast(&context.closed)),
+ .receive_data_fn = @as(*const fn (*anyopaque, []const u8, Ownership, Completion) void, @ptrCast(&Context.onData)),
+ .receive_error_fn = @as(*const fn (*anyopaque, Error) void, @ptrCast(&Context.onError)),
+ .pull_fn = @as(*const fn (*anyopaque) void, @ptrCast(&Context.onPull)),
};
}
};