authorgravatar for nyx-xyn@nyru.xyznyx-xyn <nyx-xyn@nyru.xyz> 2026-09-28 19:01:54+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-10 09:10:10+02:00
log8311f46a64cda1b641f35504bcd4f0ab72162bcd
tree1c9d1f8f9698a48a19067fff8ee3cd71b3deafd4
parent975d74f65474a9a73c007cf5dd4e1f19a7ccd25f
signature Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std/os/windows.zig: TODO fix for issue #22214


1 files changed, 9 insertions(+), 10 deletions(-)

lib/std/os/windows.zig+9-10
...@@ -3401,16 +3401,15 @@ pub const PAGE = packed struct(ULONG) {...@@ -3401,16 +3401,15 @@ pub const PAGE = packed struct(ULONG) {
3401 REVERT_TO_FILE_MAP: bool = false,3401 REVERT_TO_FILE_MAP: bool = false,
34023402
3403 pub fn fromProtection(protection: std.process.MemoryProtection) ?PAGE {3403 pub fn fromProtection(protection: std.process.MemoryProtection) ?PAGE {
3404 // TODO https://github.com/ziglang/zig/issues/222143404 return switch (protection) {
3405 return switch (@as(u3, @bitCast(protection))) {3405 .{} => .{ .NOACCESS = true },
3406 0b000 => .{ .NOACCESS = true },3406 .{ .read = true } => .{ .READONLY = true },
3407 0b001 => .{ .READONLY = true },3407 .{ .write = true } => null,
3408 0b010 => null,3408 .{ .read = true, .write = true } => .{ .READWRITE = true },
3409 0b011 => .{ .READWRITE = true },3409 .{ .execute = true } => .{ .EXECUTE = true },
3410 0b100 => .{ .EXECUTE = true },3410 .{ .read = true, .execute = true } => .{ .EXECUTE_READ = true },
3411 0b101 => .{ .EXECUTE_READ = true },3411 .{ .write = true, .execute = true } => null,
3412 0b110 => null,3412 .{ .read = true, .write = true, .execute = true } => .{ .EXECUTE_READWRITE = true },
3413 0b111 => .{ .EXECUTE_READWRITE = true },
3414 };3413 };
3415 }3414 }
3416};3415};