Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os: Implement copy_file_range #2563

Merged
merged 3 commits into from
Apr 18, 2021
Merged

os: Implement copy_file_range #2563

merged 3 commits into from
Apr 18, 2021

Conversation

deantvv
Copy link
Contributor

@deantvv deantvv commented Apr 17, 2021

Use libc::copy_file_range

Related to #1175

Copy link
Member

@coolreader18 coolreader18 left a comment

Choose a reason for hiding this comment

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

Looks good! A lot of warnings are being generated on non-linux platforms, so that some other nits and this should be good to go!

vm/src/stdlib/os.rs Outdated Show resolved Hide resolved
@@ -1195,6 1197,50 @@ mod _os {
}
}

#[derive(FromArgs)]
struct CopyFileRangeArgs {
Copy link
Member

Choose a reason for hiding this comment

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

Could you put the cfg() on here too? So there aren't unused warnings on other platforms?

Copy link
Contributor Author

@deantvv deantvv Apr 18, 2021

Choose a reason for hiding this comment

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

Maybe UtimeArgs need to move behind cfg() also?

#[derive(FromArgs)]
struct UtimeArgs {}

Copy link
Member

Choose a reason for hiding this comment

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

Oh, sure, go for it if you want

vm/src/stdlib/os.rs Outdated Show resolved Hide resolved
vm/src/stdlib/os.rs Outdated Show resolved Hide resolved
@coolreader18
Copy link
Member

Thanks for contributing!

@coolreader18 coolreader18 merged commit e254432 into RustPython:master Apr 18, 2021
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