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

Function dlclose

crates/vm/src/stdlib/_ctypes.rs:617–624  ·  view source on GitHub ↗
(handle: usize, _vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

615 #[cfg(not(windows))]
616 #[pyfunction]
617 fn dlclose(handle: usize, _vm: &VirtualMachine) -> PyResult<()> {
618 // Remove from cache, which triggers SharedLibrary drop.
619 // libloading::Library calls dlclose automatically on Drop.
620 let cache = library::libcache();
621 let mut cache_write = cache.write();
622 cache_write.drop_lib(handle);
623 Ok(())
624 }
625
626 #[cfg(not(windows))]
627 #[pyfunction]

Callers

nothing calls this directly

Calls 3

libcacheFunction · 0.85
drop_libMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected