mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-09 22:49:57 +09:00
Fix memoryview toreadonly
This commit is contained in:
@@ -655,6 +655,7 @@ impl PyMemoryView {
|
||||
fn toreadonly(zelf: PyRef<Self>, vm: &VirtualMachine) -> PyResult<PyRef<Self>> {
|
||||
zelf.try_not_released(vm)?;
|
||||
let buffer = BufferRef(Box::new(zelf.clone()));
|
||||
zelf.exports.fetch_add(1);
|
||||
Ok(PyMemoryView {
|
||||
obj: zelf.obj.clone(),
|
||||
buffer,
|
||||
|
||||
Reference in New Issue
Block a user