Skip to content

Commit

Permalink
Remove more C types from the public API
Browse files Browse the repository at this point in the history
  • Loading branch information
sunfishcode committed Jan 23, 2025
1 parent 028a169 commit 61e59af
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions src/event/epoll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@
#![allow(unused_qualifications)]

use super::epoll;
#[cfg(feature = "alloc")]
use crate::backend::c;
pub use crate::backend::event::epoll::*;
use crate::backend::event::syscalls;
use crate::fd::{AsFd, OwnedFd};
Expand Down Expand Up @@ -202,7 +200,11 @@ pub fn delete(epoll: impl AsFd, source: impl AsFd) -> io::Result<()> {
#[cfg(feature = "alloc")]
#[cfg_attr(docsrs, doc(cfg(feature = "alloc"), alias = "epoll_wait"))]
#[inline]
pub fn wait(epoll: impl AsFd, event_list: &mut EventVec, timeout: c::c_int) -> io::Result<()> {
pub fn wait(
epoll: impl AsFd,
event_list: &mut EventVec,
timeout: crate::ffi::c_int,
) -> io::Result<()> {
// SAFETY: We're calling `epoll_wait` via FFI and we know how it
// behaves.
unsafe {
Expand Down Expand Up @@ -452,6 +454,7 @@ impl<'a> IntoIterator for &'a EventVec {
#[cfg(test)]
mod tests {
use super::*;
use crate::backend::c;

#[test]
fn test_epoll_layouts() {
Expand Down
2 changes: 1 addition & 1 deletion src/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub use backend::system::types::Sysinfo;
#[cfg(linux_kernel)]
use crate::fd::AsFd;
#[cfg(linux_kernel)]
use c::c_int;
use crate::ffi::c_int;

/// `uname()`—Returns high-level information about the runtime OS and
/// hardware.
Expand Down

0 comments on commit 61e59af

Please sign in to comment.