Skip to content

Use .empty initializer and simplify param parsing helpers (latest Zig compiler compatibility 0.16.0-dev.2905)#179

Merged
Hejsil merged 2 commits intoHejsil:masterfrom
viktortnk:fix/zig-0.16-latest-compat
Mar 19, 2026
Merged

Use .empty initializer and simplify param parsing helpers (latest Zig compiler compatibility 0.16.0-dev.2905)#179
Hejsil merged 2 commits intoHejsil:masterfrom
viktortnk:fix/zig-0.16-latest-compat

Conversation

@viktortnk
Copy link
Contributor

No description provided.

clap.zig Outdated
Comment on lines +155 to +161
pub fn parseParamsIntoArrayList(list: *std.array_list.Managed(Param(Help)), str: []const u8) !void {
var i: usize = 0;
while (i != str.len) {
var end_of_this: usize = undefined;
try list.append(try parseParamEx(str[i..], &end_of_this));
i += end_of_this;
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd call toUnmanaged, call parseParamsIntoArrayListEx, then moveToUnmanaged and return instead of re implementing the function.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noted, updated.

@Hejsil Hejsil merged commit fc1e5cc into Hejsil:master Mar 19, 2026
6 checks passed
@Hejsil
Copy link
Owner

Hejsil commented Mar 19, 2026

Thanks!

@viktortnk viktortnk deleted the fix/zig-0.16-latest-compat branch March 19, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants