Show More
@@ -39,7 +39,7 b' py_class!(pub class MixedIndex |py| {' | |||||
39 | data nt: RefCell<Option<NodeTree>>; |
|
39 | data nt: RefCell<Option<NodeTree>>; | |
40 | data docket: RefCell<Option<PyObject>>; |
|
40 | data docket: RefCell<Option<PyObject>>; | |
41 | // Holds a reference to the mmap'ed persistent nodemap data |
|
41 | // Holds a reference to the mmap'ed persistent nodemap data | |
42 | data mmap: RefCell<Option<PyBuffer>>; |
|
42 | data nodemap_mmap: RefCell<Option<PyBuffer>>; | |
43 |
|
43 | |||
44 | def __new__(_cls, cindex: PyObject) -> PyResult<MixedIndex> { |
|
44 | def __new__(_cls, cindex: PyObject) -> PyResult<MixedIndex> { | |
45 | Self::new(py, cindex) |
|
45 | Self::new(py, cindex) | |
@@ -175,7 +175,7 b' py_class!(pub class MixedIndex |py| {' | |||||
175 | def clearcaches(&self, *args, **kw) -> PyResult<PyObject> { |
|
175 | def clearcaches(&self, *args, **kw) -> PyResult<PyObject> { | |
176 | self.nt(py).borrow_mut().take(); |
|
176 | self.nt(py).borrow_mut().take(); | |
177 | self.docket(py).borrow_mut().take(); |
|
177 | self.docket(py).borrow_mut().take(); | |
178 | self.mmap(py).borrow_mut().take(); |
|
178 | self.nodemap_mmap(py).borrow_mut().take(); | |
179 | self.call_cindex(py, "clearcaches", args, kw) |
|
179 | self.call_cindex(py, "clearcaches", args, kw) | |
180 | } |
|
180 | } | |
181 |
|
181 | |||
@@ -447,7 +447,7 b' impl MixedIndex {' | |||||
447 |
|
447 | |||
448 | // Keep a reference to the mmap'ed buffer, otherwise we get a dangling |
|
448 | // Keep a reference to the mmap'ed buffer, otherwise we get a dangling | |
449 | // pointer. |
|
449 | // pointer. | |
450 | self.mmap(py).borrow_mut().replace(buf); |
|
450 | self.nodemap_mmap(py).borrow_mut().replace(buf); | |
451 |
|
451 | |||
452 | let mut nt = NodeTree::load_bytes(Box::new(bytes), len); |
|
452 | let mut nt = NodeTree::load_bytes(Box::new(bytes), len); | |
453 |
|
453 |
General Comments 0
You need to be logged in to leave comments.
Login now