Commit 512cb22d83

mlugg <mlugg@mlugg.co.uk>
2024-12-16 15:52:45
std.c.darwin.posix_spawn: fix signature
And change corresponding signature in `DarwinPosixSpawn`.
1 parent 3e98102
Changed files (2)
lib/std/c/darwin.zig
@@ -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) {
src/DarwinPosixSpawn.zig
@@ -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);
@@ -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(