(value: i32, maxvalue: i32, vm: &VirtualMachine)
| 66 | |
| 67 | impl SemHandle { |
| 68 | fn create(value: i32, maxvalue: i32, vm: &VirtualMachine) -> PyResult<Self> { |
| 69 | let handle = |
| 70 | unsafe { CreateSemaphoreW(core::ptr::null(), value, maxvalue, core::ptr::null()) }; |
| 71 | if handle == 0 as HANDLE { |
| 72 | return Err(vm.new_last_os_error()); |
| 73 | } |
| 74 | Ok(SemHandle { raw: handle }) |
| 75 | } |
| 76 | |
| 77 | #[inline] |
| 78 | fn as_raw(&self) -> HANDLE { |
nothing calls this directly
no test coverage detected