MCPcopy Index your code
hub / github.com/RustPython/RustPython / getweakrefcount

Function getweakrefcount

crates/vm/src/stdlib/_weakref.rs:38–40  ·  view source on GitHub ↗
(obj: PyObjectRef)

Source from the content-addressed store, hash-verified

36
37 #[pyfunction]
38 fn getweakrefcount(obj: PyObjectRef) -> usize {
39 obj.weak_count().unwrap_or(0)
40 }
41
42 #[pyfunction]
43 fn getweakrefs(obj: PyObjectRef) -> Vec<PyObjectRef> {

Callers

nothing calls this directly

Calls 1

weak_countMethod · 0.80

Tested by

no test coverage detected