Skip to content

Update to Zig 0.16.0#18

Open
AshAmetrine wants to merge 4 commits intoziglibs:masterfrom
AshAmetrine:zig-0.16.0
Open

Update to Zig 0.16.0#18
AshAmetrine wants to merge 4 commits intoziglibs:masterfrom
AshAmetrine:zig-0.16.0

Conversation

@AshAmetrine
Copy link
Copy Markdown

Migrates the project to Zig 0.16.0.

  • Replaces deprecated @cImport with a translate-c step in build.zig.
  • Migrates the codebase to new std.Io APIs.

Copy link
Copy Markdown
Member

@ikskuh ikskuh left a comment

Choose a reason for hiding this comment

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

I have one nitpick. Just give me a heads up if you've changed it or if there's no way to change it.

Comment thread src/ini.zig Outdated
while (true) {
_ = try self.reader.streamDelimiterLimit(writer, '\n', .limited(4096));
try writer.flush();
{
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think the Io.Writer.Allocating can be reused here as well, we don't have to use the ArrayList roundtrip here

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Changed in 68228a2

This avoids the ArrayList roundtrip in the parser loop.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please drop the ArrayList completely. We don't need it when we can use the Writer.Allocating in the first place.

It's just a deprecated pattern now

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