Skip to content

Commit 9d4e9ee

Browse files
committed
expose more common interfaces
1 parent f103ab0 commit 9d4e9ee

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

vm/src/builtins/memory.rs

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ impl PyStr {
477477
}
478478

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

vm/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ pub mod readline;
6969
pub mod scope;
7070
mod sequence;
7171
mod signal;
72-
mod sliceable;
72+
pub mod sliceable;
7373
pub mod slots;
7474
pub mod stdlib;
7575
pub mod sysmodule;

vm/src/sliceable.rs

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -966,4 +966,4 @@ pub(crate) mod _struct {
966966
}
967967
}
968968

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

0 commit comments

Comments
 (0)