fix memory leak bug in rust tokenizer ty @mitsuhiko
This commit is contained in:
@@ -292,8 +292,7 @@ impl Tokenizer {
|
|||||||
|
|
||||||
// Prepare a true Python iterator object
|
// Prepare a true Python iterator object
|
||||||
let py_iter: pyo3::Py<pyo3::PyAny> = unsafe {
|
let py_iter: pyo3::Py<pyo3::PyAny> = unsafe {
|
||||||
pyo3::Bound::from_borrowed_ptr_or_err(py, pyo3::ffi::PyObject_GetIter(iterator.as_ptr()))?
|
pyo3::Py::from_owned_ptr_or_err(py, pyo3::ffi::PyObject_GetIter(iterator.as_ptr()))?
|
||||||
.into()
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Global chunk counts
|
// Global chunk counts
|
||||||
|
|||||||
Reference in New Issue
Block a user