mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 04:24:33 +01:00
std.process: fix compilation on 32-bit targets
This commit is contained in:
parent
e820173467
commit
eb718ceffa
1 changed files with 18 additions and 10 deletions
|
|
@ -1836,11 +1836,15 @@ pub fn createEnvironFromMap(
|
|||
break :a .nothing;
|
||||
};
|
||||
|
||||
const envp_count: usize = @intCast(@as(isize, map.count()) + @as(isize, switch (zig_progress_action) {
|
||||
.add => 1,
|
||||
.delete => -1,
|
||||
.nothing, .edit => 0,
|
||||
}));
|
||||
const envp_count: usize = c: {
|
||||
var count: usize = map.count();
|
||||
switch (zig_progress_action) {
|
||||
.add => count += 1,
|
||||
.delete => count -= 1,
|
||||
.nothing, .edit => {},
|
||||
}
|
||||
break :c count;
|
||||
};
|
||||
|
||||
const envp_buf = try arena.allocSentinel(?[*:0]u8, envp_count, null);
|
||||
var i: usize = 0;
|
||||
|
|
@ -1901,11 +1905,15 @@ pub fn createEnvironFromExisting(
|
|||
break :a .nothing;
|
||||
};
|
||||
|
||||
const envp_count: usize = @intCast(@as(isize, @intCast(existing_count)) + @as(isize, switch (zig_progress_action) {
|
||||
.add => 1,
|
||||
.delete => -1,
|
||||
.nothing, .edit => 0,
|
||||
}));
|
||||
const envp_count: usize = c: {
|
||||
var count: usize = existing_count;
|
||||
switch (zig_progress_action) {
|
||||
.add => count += 1,
|
||||
.delete => count -= 1,
|
||||
.nothing, .edit => {},
|
||||
}
|
||||
break :c count;
|
||||
};
|
||||
|
||||
const envp_buf = try arena.allocSentinel(?[*:0]u8, envp_count, null);
|
||||
var i: usize = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue