Show More
@@ -28,8 +28,7 b' py_class!(pub class MixedIndex |py| {' | |||
|
28 | 28 | data cindex: RefCell<cindex::Index>; |
|
29 | 29 | |
|
30 | 30 | def __new__(_cls, cindex: PyObject) -> PyResult<MixedIndex> { |
|
31 | Self::create_instance(py, RefCell::new( | |
|
32 | cindex::Index::new(py, cindex)?)) | |
|
31 | Self::new(py, cindex) | |
|
33 | 32 | } |
|
34 | 33 | |
|
35 | 34 | /// Compatibility layer used for Python consumers needing access to the C index |
@@ -199,6 +198,13 b' py_class!(pub class MixedIndex |py| {' | |||
|
199 | 198 | }); |
|
200 | 199 | |
|
201 | 200 | impl MixedIndex { |
|
201 | fn new(py: Python, cindex: PyObject) -> PyResult<MixedIndex> { | |
|
202 | Self::create_instance( | |
|
203 | py, | |
|
204 | RefCell::new(cindex::Index::new(py, cindex)?), | |
|
205 | ) | |
|
206 | } | |
|
207 | ||
|
202 | 208 | /// forward a method call to the underlying C index |
|
203 | 209 | fn call_cindex( |
|
204 | 210 | &self, |
General Comments 0
You need to be logged in to leave comments.
Login now