Skip to content

Commit

Permalink
std.c.darwin.posix_spawn: fix signature
Browse files Browse the repository at this point in the history
And change corresponding signature in `DarwinPosixSpawn`.
  • Loading branch information
mlugg committed Dec 16, 2024
1 parent 3e98102 commit 512cb22
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions lib/std/c/darwin.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1232,16 +1232,16 @@ pub extern "c" fn posix_spawn(
path: [*:0]const u8,
actions: ?*const posix_spawn_file_actions_t,
attr: ?*const posix_spawnattr_t,
argv: [*:null]?[*:0]const u8,
env: [*:null]?[*:0]const u8,
argv: [*:null]const ?[*:0]const u8,
env: [*:null]const ?[*:0]const u8,
) c_int;
pub extern "c" fn posix_spawnp(
pid: *pid_t,
path: [*:0]const u8,
actions: ?*const posix_spawn_file_actions_t,
attr: ?*const posix_spawnattr_t,
argv: [*:null]?[*:0]const u8,
env: [*:null]?[*:0]const u8,
argv: [*:null]const ?[*:0]const u8,
env: [*:null]const ?[*:0]const u8,
) c_int;

pub const E = enum(u16) {
Expand Down
8 changes: 4 additions & 4 deletions src/DarwinPosixSpawn.zig
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ pub fn spawn(
path: []const u8,
actions: ?Actions,
attr: ?Attr,
argv: [*:null]?[*:0]const u8,
envp: [*:null]?[*:0]const u8,
argv: [*:null]const ?[*:0]const u8,
envp: [*:null]const ?[*:0]const u8,
) Error!std.c.pid_t {
const posix_path = try std.posix.toPosixPath(path);
return spawnZ(&posix_path, actions, attr, argv, envp);
Expand All @@ -172,8 +172,8 @@ pub fn spawnZ(
path: [*:0]const u8,
actions: ?Actions,
attr: ?Attr,
argv: [*:null]?[*:0]const u8,
envp: [*:null]?[*:0]const u8,
argv: [*:null]const ?[*:0]const u8,
envp: [*:null]const ?[*:0]const u8,
) Error!std.c.pid_t {
var pid: std.c.pid_t = undefined;
switch (errno(std.c.posix_spawn(
Expand Down

0 comments on commit 512cb22

Please sign in to comment.