870a4bb20d
* deprecate GIL Refs in function arguments * fix deprecated gil refs in function arguments * add notes on deprecations limitations to migration guide * Apply suggestions from code review Co-authored-by: Icxolu <10486322+Icxolu@users.noreply.github.com> * review: Icxolu * fix proto method extract failure for option * fix gil refs in examples --------- Co-authored-by: Icxolu <10486322+Icxolu@users.noreply.github.com>
15 lines
239 B
Rust
15 lines
239 B
Rust
use pyo3::prelude::*;
|
|
use pyo3::types::PyList;
|
|
|
|
#[pyfunction]
|
|
fn static_ref(list: &'static Bound<'_, PyList>) -> usize {
|
|
list.len()
|
|
}
|
|
|
|
#[pyfunction]
|
|
fn static_py(list: &Bound<'static, PyList>) -> usize {
|
|
list.len()
|
|
}
|
|
|
|
fn main() {}
|