Skip to content

Commit

Permalink
use correct calling convention
Browse files Browse the repository at this point in the history
  • Loading branch information
dylan-conway committed Feb 4, 2025
1 parent a8d159d commit 05c64f9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/async/posix_event_loop.zig
Original file line number Diff line number Diff line change
Expand Up @@ -592,8 +592,10 @@ pub const FilePoll = struct {

poll.flags.insert(.ignore_updates);
this.pending_free_tail = poll;
bun.assert(vm.after_event_loop_callback == null or vm.after_event_loop_callback == @as(?JSC.OpaqueCallback, @ptrCast(&processDeferredFrees)));
vm.after_event_loop_callback = @ptrCast(&processDeferredFrees);

const callback = JSC.OpaqueWrap(Store, processDeferredFrees);
bun.assert(vm.after_event_loop_callback == null or vm.after_event_loop_callback == @as(?JSC.OpaqueCallback, callback));
vm.after_event_loop_callback = callback;
vm.after_event_loop_callback_ctx = this;
}
};
Expand Down
6 changes: 4 additions & 2 deletions src/async/windows_event_loop.zig
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,10 @@ pub const FilePoll = struct {

poll.flags.insert(.ignore_updates);
this.pending_free_tail = poll;
bun.assert(vm.after_event_loop_callback == null or vm.after_event_loop_callback == @as(?JSC.OpaqueCallback, @ptrCast(&processDeferredFrees)));
vm.after_event_loop_callback = @ptrCast(&processDeferredFrees);

const callback = JSC.OpaqueWrap(Store, processDeferredFrees);
bun.assert(vm.after_event_loop_callback == null or vm.after_event_loop_callback == @as(?JSC.OpaqueCallback, callback));
vm.after_event_loop_callback = callback;
vm.after_event_loop_callback_ctx = this;
}
};
Expand Down

0 comments on commit 05c64f9

Please sign in to comment.