(name: PyUtf8StrRef, vm: &VirtualMachine)
| 40 | |
| 41 | #[pyfunction] |
| 42 | fn shm_unlink(name: PyUtf8StrRef, vm: &VirtualMachine) -> PyResult<()> { |
| 43 | let name = CString::new(name.as_str()).map_err(|e| e.into_pyexception(vm))?; |
| 44 | // SAFETY: `name` is a valid NUL-terminated string and `shm_unlink` only reads it. |
| 45 | let ret = unsafe { libc::shm_unlink(name.as_ptr()) }; |
| 46 | if ret == -1 { |
| 47 | Err(errno_io_error().into_pyexception(vm)) |
| 48 | } else { |
| 49 | Ok(()) |
| 50 | } |
| 51 | } |
| 52 | } |
nothing calls this directly
no test coverage detected