Skip to content

Commit

Permalink
Zig commentary fixups
Browse files Browse the repository at this point in the history
A few outdated comments wrt the std.(posix|os) changeups that
happened for 0.12.
  • Loading branch information
blblack committed Apr 22, 2024
1 parent 592ff53 commit d5f61b1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/getopt.zig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const std = @import("std");
///
/// Normal POSIX/C getopt() || Zig getopt()
/// ---------------------------------------------------------------------
/// while((f = getopt(argc, argv, "abc")) || var o = getopt(std.posix.argv, "abc");
/// while((f = getopt(argc, argv, "abc")) || var o = getopt(std.os.argv, "abc");
/// != -1) { ... } || while(o.next()) |f| { ... }
/// char* x = optarg; || var x = o.getOptArg().?;
/// char c = optopt; || var c = o.getOptOpt();
Expand Down Expand Up @@ -201,7 +201,7 @@ test getopt {
"myprogram", "-i", "1234", "-v", "--", "foo",
};

// In a real program, you'd probably pass std.posix.argv instead of &myargv
// In a real program, you'd probably pass std.os.argv instead of &myargv
var goi = getopt(&myargv, ":vi:");
while (goi.next()) |flag| {
switch (flag) {
Expand Down
2 changes: 1 addition & 1 deletion src/lsys.zig
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pub fn _clock_nanosleep(clk_id: i32, flags: i32, req: *const posix.timespec, rem
}

// -------------------
// These bits would go in lib/std/os.zig (aka posix) and are the real public interface
// These bits would go in lib/std/posix.zig and are the real public interface
// -------------------

pub fn mlockall(flags: i32) !void {
Expand Down

0 comments on commit d5f61b1

Please sign in to comment.