rust/hg-cpython/src/ref_sharing.rs
changeset 43286 f8c114f20d2d
parent 43285 ffc1fbd7d1f5
child 43287 0df8312463ae
--- a/rust/hg-cpython/src/ref_sharing.rs	Sun Sep 15 22:19:10 2019 +0900
+++ b/rust/hg-cpython/src/ref_sharing.rs	Sat Sep 21 17:15:50 2019 +0900
@@ -136,7 +136,7 @@
         }
     }
 
-    pub fn borrow(&self) -> Ref<T> {
+    pub fn borrow<'a>(&'a self, _py: Python<'a>) -> Ref<'a, T> {
         // py_shared_state isn't involved since
         // - inner.borrow() would fail if self is mutably borrowed,
         // - and inner.borrow_mut() would fail while self is borrowed.
@@ -180,7 +180,7 @@
     }
 
     pub fn borrow(&self) -> Ref<'a, T> {
-        self.data.borrow()
+        self.data.borrow(self.py)
     }
 
     pub fn borrow_mut(&self) -> PyResult<PyRefMut<'a, T>> {