MCPcopy Create free account
hub / github.com/bytecodealliance/rustix / fetch

Function fetch

src/weak.rs:139–145  ·  view source on GitHub ↗
(name: &str)

Source from the content-addressed store, hash-verified

137}
138
139unsafe fn fetch(name: &str) -> *mut c_void {
140 let name = match CStr::from_bytes_with_nul(name.as_bytes()) {
141 Ok(c_str) => c_str,
142 Err(..) => return null_mut(),
143 };
144 libc::dlsym(libc::RTLD_DEFAULT, name.as_ptr().cast())
145}
146
147#[cfg(not(linux_kernel))]
148macro_rules! syscall {

Callers 1

initializeMethod · 0.70

Calls 2

as_bytesMethod · 0.45
as_ptrMethod · 0.45

Tested by

no test coverage detected