Skip to content

Commit 5f0a13c

Browse files
committed
Make get_value(PyObjectRef)->T functions pub(crate)
1 parent 32a1dd6 commit 5f0a13c

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

vm/src/builtins/float.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ impl Hashable for PyFloat {
555555
pub type PyFloatRef = PyRef<PyFloat>;
556556

557557
// Retrieve inner float value:
558-
pub fn get_value(obj: &PyObjectRef) -> f64 {
558+
pub(crate) fn get_value(obj: &PyObjectRef) -> f64 {
559559
obj.payload::<PyFloat>().unwrap().value
560560
}
561561

vm/src/builtins/int.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ fn detect_base(c: &u8) -> Option<u32> {
888888
}
889889

890890
// Retrieve inner int value:
891-
pub fn get_value(obj: &PyObjectRef) -> &BigInt {
891+
pub(crate) fn get_value(obj: &PyObjectRef) -> &BigInt {
892892
&obj.payload::<PyInt>().unwrap().value
893893
}
894894

vm/src/builtins/pybool.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ pub(crate) fn init(context: &PyContext) {
162162
// }
163163

164164
// Retrieve inner int value:
165-
pub fn get_value(obj: &PyObjectRef) -> bool {
165+
pub(crate) fn get_value(obj: &PyObjectRef) -> bool {
166166
!obj.payload::<PyInt>().unwrap().borrow_value().is_zero()
167167
}
168168

vm/src/builtins/pystr.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,11 +1183,11 @@ pub fn init(ctx: &PyContext) {
11831183
PyStrReverseIterator::extend_class(ctx, &ctx.types.str_reverseiterator_type);
11841184
}
11851185

1186-
pub fn clone_value(obj: &PyObjectRef) -> String {
1186+
pub(crate) fn clone_value(obj: &PyObjectRef) -> String {
11871187
String::from(obj.payload::<PyStr>().unwrap().borrow_value())
11881188
}
11891189

1190-
pub fn borrow_value(obj: &PyObjectRef) -> &str {
1190+
pub(crate) fn borrow_value(obj: &PyObjectRef) -> &str {
11911191
&obj.payload::<PyStr>().unwrap().value
11921192
}
11931193

0 commit comments

Comments
 (0)