mirror of
https://github.com/ziglang/zig.git
synced 2024-11-26 23:22:44 +00:00
windows x86_64 C ABI: pass byref structs as byref_mut
This commit is contained in:
parent
8b35f09f4a
commit
24646b8b5d
@ -10668,8 +10668,7 @@ const ParamTypeIterator = struct {
|
||||
.memory => {
|
||||
it.zig_index += 1;
|
||||
it.llvm_index += 1;
|
||||
it.byval_attr = true;
|
||||
return .byref;
|
||||
return .byref_mut;
|
||||
},
|
||||
.sse => {
|
||||
it.zig_index += 1;
|
||||
|
@ -1032,7 +1032,6 @@ extern fn c_modify_by_ref_param(ByRef) ByRef;
|
||||
|
||||
test "C function modifies by ref param" {
|
||||
if (comptime builtin.cpu.arch.isPPC()) return error.SkipZigTest;
|
||||
if (builtin.cpu.arch == .x86_64 and builtin.os.tag == .windows and builtin.mode != .Debug) return error.SkipZigTest;
|
||||
|
||||
const res = c_modify_by_ref_param(.{ .val = 1, .arr = undefined });
|
||||
try expect(res.val == 42);
|
||||
|
Loading…
Reference in New Issue
Block a user