(&self, i: &BigInt)
| 491 | |
| 492 | #[inline] |
| 493 | pub fn new_bigint(&self, i: &BigInt) -> PyIntRef { |
| 494 | if let Some(i) = i.to_i32() |
| 495 | && Self::INT_CACHE_POOL_RANGE.contains(&i) |
| 496 | { |
| 497 | let inner_idx = (i - Self::INT_CACHE_POOL_MIN) as usize; |
| 498 | return self.int_cache_pool[inner_idx].clone(); |
| 499 | } |
| 500 | PyInt::from(i.clone()).into_ref(self) |
| 501 | } |
| 502 | |
| 503 | #[inline] |
| 504 | pub fn new_float(&self, value: f64) -> PyRef<PyFloat> { |
no test coverage detected