update zig

This commit is contained in:
Mitchell Hashimoto 2023-11-20 19:30:16 -08:00
parent a38331cb6e
commit 10e552bd37
No known key found for this signature in database
GPG key ID: 523D5DC389D273BC
2 changed files with 5 additions and 7 deletions

6
flake.lock generated
View file

@ -109,11 +109,11 @@
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1697847645, "lastModified": 1700526194,
"narHash": "sha256-Hnc0EGGVTV1w8tnFRJMtEDXl16S9JmlOphYBjiR1u8c=", "narHash": "sha256-/7C9bzFG0Gq/tBAbSwC84Dg5TNPomCcxIJJQNj3Y2BI=",
"owner": "mitchellh", "owner": "mitchellh",
"repo": "zig-overlay", "repo": "zig-overlay",
"rev": "5b3efe4890dfee644bb8b7d98834de1b08b35d49", "rev": "2877b025231e96196469ee8a5b80799027b42e03",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -38,9 +38,7 @@ pub fn MsgSend(comptime T: type) type {
// Build our function type and call it // Build our function type and call it
const Fn = MsgSendFn(RealReturn, @TypeOf(target.value), @TypeOf(args)); const Fn = MsgSendFn(RealReturn, @TypeOf(target.value), @TypeOf(args));
const msg_send_fn = comptime msgSendPtr(RealReturn, false); const msg_send_fn = comptime msgSendPtr(RealReturn, false);
// Due to this stage2 Zig issue[1], this must be var for now. const msg_send_ptr: *const Fn = @ptrCast(msg_send_fn);
// [1]: https://github.com/ziglang/zig/issues/13598
var msg_send_ptr: *const Fn = @ptrCast(msg_send_fn);
const result = @call(.auto, msg_send_ptr, .{ target.value, sel.value } ++ args); const result = @call(.auto, msg_send_ptr, .{ target.value, sel.value } ++ args);
if (!is_object) return result; if (!is_object) return result;
@ -66,7 +64,7 @@ pub fn MsgSend(comptime T: type) type {
const Fn = MsgSendFn(RealReturn, *c.objc_super, @TypeOf(args)); const Fn = MsgSendFn(RealReturn, *c.objc_super, @TypeOf(args));
const msg_send_fn = comptime msgSendPtr(RealReturn, true); const msg_send_fn = comptime msgSendPtr(RealReturn, true);
var msg_send_ptr: *const Fn = @ptrCast(msg_send_fn); const msg_send_ptr: *const Fn = @ptrCast(msg_send_fn);
var super: c.objc_super = .{ var super: c.objc_super = .{
.receiver = target.value, .receiver = target.value,
.super_class = superclass.value, .super_class = superclass.value,