Skip to content

Commit f9eedf5

Browse files
committed
expose more common interfaces
1 parent 4bb3788 commit f9eedf5

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

vm/src/builtins/memory.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use crate::{
1111
protocol::{BufferInternal, BufferOptions, PyBuffer},
1212
sliceable::{convert_slice, wrap_index, SequenceIndex},
1313
slots::{AsBuffer, Comparable, Hashable, PyComparisonOp, SlotConstructor},
14-
stdlib::pystruct::_struct::FormatSpec,
14+
stdlib::pystruct::FormatSpec,
1515
utils::Either,
1616
IdProtocol, IntoPyObject, PyClassImpl, PyComparisonValue, PyContext, PyObjectRef, PyRef,
1717
PyResult, PyValue, TryFromBorrowedObject, TryFromObject, TypeProtocol, VirtualMachine,

vm/src/builtins/pystr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ impl PyStr {
475475
}
476476

477477
#[pymethod(magic)]
478-
pub(crate) fn repr(&self, vm: &VirtualMachine) -> PyResult<String> {
478+
pub fn repr(&self, vm: &VirtualMachine) -> PyResult<String> {
479479
let in_len = self.byte_len();
480480
let mut out_len = 0usize;
481481
// let mut max = 127;

vm/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ mod pyobjectrc;
6868
pub mod readline;
6969
pub mod scope;
7070
mod sequence;
71-
mod sliceable;
71+
pub mod sliceable;
7272
pub mod slots;
7373
pub mod stdlib;
7474
pub mod sysmodule;

vm/src/sliceable.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ pub(crate) fn wrap_index(p: isize, len: usize) -> Option<usize> {
404404
}
405405

406406
// return pos is in range [0, len] inclusive
407-
pub(crate) fn saturate_index(p: isize, len: usize) -> usize {
407+
pub fn saturate_index(p: isize, len: usize) -> usize {
408408
let mut p = p;
409409
let len = len.to_isize().unwrap();
410410
if p < 0 {

vm/src/stdlib/pystruct.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -967,4 +967,4 @@ pub(crate) mod _struct {
967967
}
968968
}
969969

970-
pub(crate) use _struct::make_module;
970+
pub(crate) use _struct::{make_module, FormatSpec};

0 commit comments

Comments
 (0)