fix compilation errors for fs and fs.Dir#21643
Merged
alexrp merged 11 commits intoziglang:masterfrom Oct 16, 2024
Merged
Conversation
linusg
reviewed
Oct 10, 2024
Collaborator
linusg
left a comment
There was a problem hiding this comment.
https://ziglang.org/documentation/master/std/#std.mem.span seems like the better choice for this
Contributor
Author
|
Ok! I can rework it. |
Contributor
Author
|
Worth mentioning I got the original pub fn isAbsoluteWindowsW(path_w: [*:0]const u16) bool {
return isAbsoluteWindowsImpl(u16, mem.sliceTo(path_w, 0));
}Should that be changed to: pub fn isAbsoluteWindowsW(path_w: [*:0]const u16) bool {
return isAbsoluteWindowsImpl(u16, mem.span(path_w));
}Ok if that is outside the scope for this PR though |
JustinBraben
commented
Oct 10, 2024
Contributor
Author
|
Ok landed on this pub fn symLinkAbsoluteW(
target_path_w: [*:0]const u16,
sym_link_path_w: [*:0]const u16,
flags: Dir.SymLinkFlags,
) !void {
assert(path.isAbsoluteWindowsW(target_path_w));
assert(path.isAbsoluteWindowsW(sym_link_path_w));
return windows.CreateSymbolicLink(null, mem.span(sym_link_path_w), mem.span(target_path_w), flags.is_directory);
} |
Contributor
Author
|
@linusg I switched the sliceTo to mem.span . Think it's ready for another look. |
alexrp
reviewed
Oct 16, 2024
linusg
approved these changes
Oct 16, 2024
alexrp
approved these changes
Oct 16, 2024
richerfu
pushed a commit
to richerfu/zig
that referenced
this pull request
Oct 28, 2024
* fix compilation errors for fs and fs.Dir * mem.span instead of mem.sliceTo * Updating symLinkAbsoluteW function parameters * Update with expected rename semantics
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the std.fs related compiler errors mentioned in #20505