comparison doc/runrst @ 43423:945d4dba5e78

rust-cpython: add stub wrapper that'll prevent leaked data from being mutated In order to allow mutation of PySharedRefCell value while PyLeaked reference exists, we need yet another "borrow" scope where mutation is prohibited. try_borrow<'a> and try_borrow_mut<'a> defines the "borrow" scope <'a>. The subsequent patches will implement leak counter based on this scope. PyLeakedRef<T> and PyLeakedRefMut<T> could be unified to PyLeakedRef<&T> and PyLeakedRef<&mut T> respectively, but I didn't do that since it seemed a bit weird that deref_mut() would return a mutable reference to an immutable reference.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 12 Oct 2019 19:26:23 +0900
parents 4e4fae1dda5c
children 15cccbacd5ce
comparison
equal deleted inserted replaced
43422:b9f791090211 43423:945d4dba5e78