mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-29 03:04:38 +08:00
Fix memoryview toreadonly
This commit is contained in:
1 parent
44048f60cb
commit
fcca2d72f4
1 file changed
+1
@@ -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