(name: SysconfName, vm: &VirtualMachine)
| 2597 | |
| 2598 | #[pyfunction] |
| 2599 | fn sysconf(name: SysconfName, vm: &VirtualMachine) -> PyResult<libc::c_long> { |
| 2600 | crate::common::os::set_errno(0); |
| 2601 | let r = unsafe { libc::sysconf(name.0) }; |
| 2602 | if r == -1 && crate::common::os::get_errno() != 0 { |
| 2603 | return Err(vm.new_last_errno_error()); |
| 2604 | } |
| 2605 | Ok(r) |
| 2606 | } |
| 2607 | |
| 2608 | #[pyattr] |
| 2609 | fn sysconf_names(vm: &VirtualMachine) -> PyDictRef { |
no test coverage detected