Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7a3ae26

Browse files
committed
comment
1 parentf1eb9ca commit7a3ae26

File tree

1 file changed

+0
-41
lines changed

1 file changed

+0
-41
lines changed

‎vm/src/pyobject.rs

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -809,47 +809,6 @@ where
809809
}
810810
}
811811

812-
// use crate::obj::objmemory::PyMemoryViewRef;
813-
814-
// pub trait BufferProtocol {
815-
// // fn readonly(&self) -> bool;
816-
// fn as_memoryview(&self, vm: &VirtualMachine) -> PyResult<PyMemoryViewRef>;
817-
// }
818-
819-
// impl<T: ?Sized + PyObjectPayload> BufferProtocol for PyObject<T> {
820-
// fn as_memoryview(&self, vm: &VirtualMachine) -> PyResult<PyMemoryViewRef> {
821-
// Err(vm.new_not_implemented_error("This object does not implement buffer protocol".to_owned()))
822-
// }
823-
// }
824-
825-
// impl<T: PyObjectPayload> BufferProtocol for PyRef<T> {
826-
// fn as_memoryview(&self, vm: &VirtualMachine) -> PyResult<PyMemoryViewRef> {
827-
// self.obj.as_memoryview(vm)
828-
// }
829-
// }
830-
831-
// impl<T: ?Sized + BufferProtocol> BufferProtocol for PyRc<T> {
832-
// fn as_memoryview(&self, vm: &VirtualMachine) -> PyResult<PyMemoryViewRef> {
833-
// (**self).as_memoryview(vm)
834-
// }
835-
// }
836-
837-
// impl<T: BufferProtocol> BufferProtocol for &T {
838-
// fn as_memoryview(&self, vm: &VirtualMachine) -> PyResult<PyMemoryViewRef> {
839-
// (&**self).as_memoryview(vm)
840-
// }
841-
// }
842-
843-
// impl BufferProtocol for PyObjectRef {
844-
// fn readonly(&self) -> bool {
845-
// match self.lease_class().name.as_str() {
846-
// "bytes" => false,
847-
// "bytearray" | "memoryview" => true,
848-
// _ => panic!("Bytes-Like type expected not {:?}", self),
849-
// }
850-
// }
851-
// }
852-
853812
impl fmt::DebugforPyObject<dynPyObjectPayload>{
854813
fnfmt(&self,f:&mut fmt::Formatter) -> fmt::Result{
855814
write!(f,"[PyObj {:?}]",&self.payload)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp