MCPcopy Create free account
hub / github.com/argumentcomputer/ix / rs_refcount_owned_array_drop

Function rs_refcount_owned_array_drop

crates/ffi/src/refcount.rs:106–114  ·  view source on GitHub ↗
(
  arr: LeanArray<LeanOwned>,
)

Source from the content-addressed store, hash-verified

104/// The owned array is dropped at the end → lean_dec_ref on each element.
105#[unsafe(no_mangle)]
106pub extern "C" fn rs_refcount_owned_array_drop(
107 arr: LeanArray<LeanOwned>,
108) -> LeanOwned {
109 let count = arr.len();
110 for i in 0..count {
111 let _ = LeanIxName(arr.get(i)).decode();
112 }
113 LeanNat::from_nat(&Nat::from(count as u64)).into()
114}
115
116/// Take an owned List of Exprs, consume and count.
117#[unsafe(no_mangle)]

Callers

nothing calls this directly

Calls 3

lenMethod · 0.45
decodeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected