Skip to content

Commit 7a3ae26

Browse files
committed
comment
1 parent f1eb9ca commit 7a3ae26

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::Debug for PyObject<dyn PyObjectPayload> {
854813
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
855814
write!(f, "[PyObj {:?}]", &self.payload)

0 commit comments

Comments
 (0)