GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — mmap module by killme2008 · Pull Request #3755 · RustPython/RustPython Conversation
|
|
@youknowone I found that it can't be compiled in main branch with such error: Do i miss something? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
build errors not reproduced by CI is mostly rust version problem. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@youknowone Got it, my rust version is older. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Some of your libc imports are causing rustc and/or clippy to complain.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
There's a test in Can you copy |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@fanninpm thank you. This PR isn't ready for review, it's draft right now. I have some protocols such as |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@youknowone @fanninpm But there are still some work to do because of
And i don't implement this module on windows platform too. Please help me review this module, thank you. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Can you break out |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@fanninpm Of course, i will break it out. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Great! You made a big feature! I left a few comments.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@youknowone @fermian @qingshi163 Thank you for all your comments, i will resolve them ASAP. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@youknowone I tried to address all the CR problems in 3ba2341 Please review this PR again. Thank you. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@fanninpm @youknowone @qingshi163 I tried to address all CR problems again in commit eed1537 and fixed |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@youknowone I rebased the commits , split the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
b5e9c1f to
a93435d
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Almost there! Just a few quick changes.
Even if anyone else hasn't already said this, thank you for contributing a significant amount of time and effort on this.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| #[cfg(target_os = "linux")] | ||
| libc::MADV_FREE => Advice::Free, |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This is also present on macOS and iOS, as of memmap2 v0.5.4. If this doesn't work, you may need to have Cargo refresh the Cargo.lock file.
| #[cfg(target_os = "linux")] | |
| libc::MADV_FREE => Advice::Free, | |
| #[cfg(any(target_os = "linux", target_vendor = "apple"))] | |
| libc::MADV_FREE => Advice::Free, |
(Please note that memmap2 does not currently support BSD systems, as the upstream maintainer has not currently set up CI for them.)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| #[cfg(target_os = "linux")] | ||
| #[pyattr] | ||
| use libc::{ | ||
| MADV_DODUMP, MADV_DOFORK, MADV_DONTDUMP, MADV_DONTFORK, MADV_FREE, MADV_HUGEPAGE, |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
MADV_FREE is also present on Apple devices (and the four major BSDs).
I suggest using something like this (with applicable formatting):
#[cfg(any(target_os = "android", target_os = "dragonfly", target_os = "fuchsia", target_os = "freebsd", target_os = "linux", target_os = "netbsd", target_os = "openbsd", target_vendor = "apple"))] #[pyattr] use libc::MADV_FREE;
As for the other imports from libc, I recommend searching the .txt files in https://github.com/rust-lang/libc to see exactly which platforms are compatible with which constants/methods from libc.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| 0 => dist, /* relative to start */ | ||
| 1 => { | ||
| /* relative to current position */ | ||
| let pos = self.pos(); | ||
| if (((isize::MAX as usize) - pos) as isize) < dist { | ||
| return Err(vm.new_value_error("seek out of range".to_owned())); | ||
| } | ||
| pos as isize + dist | ||
| } | ||
| 2 => { | ||
| /* relative to end */ |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Very minor nitpick: These comments (/* ... */) are inconsistent with the other comments in this file (// ...).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I changed memmap2 version to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Great! Thank you for the long time effort!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@youknowone @fanninpm Thank you for all your helper. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.