(&self, vm: &VirtualMachine)
| 717 | |
| 718 | #[pymethod] |
| 719 | fn tolist(&self, vm: &VirtualMachine) -> PyResult<PyListRef> { |
| 720 | self.try_not_released(vm)?; |
| 721 | let bytes = self.buffer.obj_bytes(); |
| 722 | if self.desc.ndim() == 0 { |
| 723 | return Ok(vm.ctx.new_list(vec![format_unpack( |
| 724 | &self.format_spec, |
| 725 | &bytes[..self.desc.itemsize], |
| 726 | vm, |
| 727 | )?])); |
| 728 | } |
| 729 | self._to_list(&bytes, 0, 0, vm) |
| 730 | } |
| 731 | |
| 732 | #[pymethod] |
| 733 | fn toreadonly(&self, vm: &VirtualMachine) -> PyResult<PyRef<Self>> { |
nothing calls this directly
no test coverage detected