diff options
| author | 2024-01-09 08:21:40 +0100 | |
|---|---|---|
| committer | 2024-01-09 08:21:40 +0100 | |
| commit | 9c23bcb5aebe0c2542b4de4472f60959974e2222 (patch) | |
| tree | 3996406fe210e401b7d5f93fabad0ee4f2216934 | |
| parent | Update to latest master (diff) | |
| download | zig-clap-9c23bcb5aebe0c2542b4de4472f60959974e2222.tar.gz zig-clap-9c23bcb5aebe0c2542b4de4472f60959974e2222.tar.xz zig-clap-9c23bcb5aebe0c2542b4de4472f60959974e2222.zip | |
Update to latest version of zig
Diffstat (limited to '')
| -rw-r--r-- | clap.zig | 4 | ||||
| -rw-r--r-- | example/README.md.template | 6 |
2 files changed, 8 insertions, 2 deletions
| @@ -913,9 +913,9 @@ fn Arguments( | |||
| 913 | }, | 913 | }, |
| 914 | }; | 914 | }; |
| 915 | 915 | ||
| 916 | const name = longest.name[0..longest.name.len].*; | 916 | const name = longest.name[0..longest.name.len] ++ ""; // Adds null terminator |
| 917 | fields[i] = .{ | 917 | fields[i] = .{ |
| 918 | .name = &name, | 918 | .name = name, |
| 919 | .type = @TypeOf(default_value), | 919 | .type = @TypeOf(default_value), |
| 920 | .default_value = @ptrCast(&default_value), | 920 | .default_value = @ptrCast(&default_value), |
| 921 | .is_comptime = false, | 921 | .is_comptime = false, |
diff --git a/example/README.md.template b/example/README.md.template index 34bff56..b296ca3 100644 --- a/example/README.md.template +++ b/example/README.md.template | |||
| @@ -23,6 +23,12 @@ in the release notes. | |||
| 23 | * Print help message from parameter specification. | 23 | * Print help message from parameter specification. |
| 24 | * Parse help message to parameter specification. | 24 | * Parse help message to parameter specification. |
| 25 | 25 | ||
| 26 | ## API Reference | ||
| 27 | |||
| 28 | Automatically generated API Reference for the project | ||
| 29 | can be found at https://Hejsil.github.io/zig-clap. | ||
| 30 | Note that Zig autodoc is in beta; the website may be broken or incomplete. | ||
| 31 | |||
| 26 | ## Examples | 32 | ## Examples |
| 27 | 33 | ||
| 28 | ### `clap.parse` | 34 | ### `clap.parse` |