mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Apply review comments
This commit is contained in:
3 files changed
+9
-2
No files matched your search
Generated
+2
@@ -2336,6 +2336,8 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "sre-engine"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e5872399287c284fed4bc773cb7f6041623ac88213774f5e11e89e2131681fc1"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"num_enum",
|
||||
|
||||
@@ -126,6 +126,7 @@ impl<'a> BorrowValue<'a> for PyRwBytesLike {
|
||||
}
|
||||
}
|
||||
|
||||
/// A buffer or utf8 string. Like the `s*` format code for `PyArg_Parse` in CPython.
|
||||
pub enum BufOrStr {
|
||||
Buf(PyBytesLike),
|
||||
Str(PyStrRef),
|
||||
|
||||
@@ -12,9 +12,13 @@ mod resource {
|
||||
if #[cfg(target_os = "linux")] {
|
||||
use libc::RLIMIT_NLIMITS as RLIM_NLIMITS;
|
||||
} else if #[cfg(target_os = "android")] {
|
||||
pub const RLIM_NLIMITS: i32 = 16;
|
||||
// TODO: this should be in libc soon
|
||||
const RLIM_NLIMITS: i32 = 16;
|
||||
} else {
|
||||
use libc::RLIM_NLIMITS;
|
||||
// in bsd-ish platforms, this constant isn't abi-stable across os versions, so we just
|
||||
// pick a high number so we don't get false positive ValueErrors and just bubble up the
|
||||
// EINVAL that get/setrlimit return on an invalid resource
|
||||
const RLIM_NLIMITS: i32 = 256;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user