MCPcopy Create free account
hub / github.com/digama0/lean-sys / lean_set_external_data

Function lean_set_external_data

src/external.rs:27–37  ·  view source on GitHub ↗
(o: *mut lean_object, data: *mut c_void)

Source from the content-addressed store, hash-verified

25
26#[inline(always)]
27pub unsafe fn lean_set_external_data(o: *mut lean_object, data: *mut c_void) -> *mut lean_object {
28 if lean_is_exclusive(o) {
29 (raw_field!(lean_to_external(o), lean_external_object, m_data) as *mut *mut c_void)
30 .write(data);
31 o
32 } else {
33 let o_new = lean_alloc_external(lean_get_external_class(o), data);
34 lean_dec_ref(o);
35 o_new
36 }
37}
38
39extern "C" {
40 pub fn lean_register_external_class(

Callers

nothing calls this directly

Calls 4

lean_is_exclusiveFunction · 0.85
lean_alloc_externalFunction · 0.85
lean_get_external_classFunction · 0.85
lean_dec_refFunction · 0.85

Tested by

no test coverage detected