Apply review comments

This commit is contained in:
Noah committed 2021-04-21 20:44:18 -05:00
1 parent 666383633f
commit 696aa99b80
3 files changed
+9 -2

No files matched your search

Generated
+2
View File
@@ -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",
+1
View File
@@ -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),
+6 -2
View File
@@ -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;
}
}