mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 02:39:28 +00:00
Upgrade to PyO3 0.22
This commit is contained in:
parent
ffce61ca97
commit
9253af05b1
3 changed files with 12 additions and 9 deletions
|
@ -42,7 +42,7 @@ impl ToPyObject for PyValueRef<'_> {
|
|||
crate::image::PyImage::from(image).into_py(py)
|
||||
}
|
||||
slint_interpreter::Value::Model(model) => {
|
||||
crate::models::PyModelShared::rust_into_js_model(model)
|
||||
crate::models::PyModelShared::rust_into_js_model(model, py)
|
||||
.unwrap_or_else(|| crate::models::ReadOnlyRustModel::from(model).into_py(py))
|
||||
}
|
||||
slint_interpreter::Value::Struct(structval) => {
|
||||
|
@ -59,8 +59,8 @@ impl ToPyObject for PyValueRef<'_> {
|
|||
}
|
||||
}
|
||||
|
||||
impl FromPyObject<'_> for PyValue {
|
||||
fn extract(ob: &PyAny) -> PyResult<Self> {
|
||||
impl<'py> FromPyObject<'py> for PyValue {
|
||||
fn extract_bound(ob: &Bound<'py, PyAny>) -> PyResult<Self> {
|
||||
if ob.is_none() {
|
||||
return Ok(slint_interpreter::Value::Void.into());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue