Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: Use c_int where applicable #78

Merged
merged 1 commit into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/src/fs.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use core::cmp;
use core::{cmp, ffi::c_int};

use bitflags::bitflags;

Expand All @@ -8,7 +8,7 @@ bitflags! {
/// Definition of file open flags which can be mixed and matched as appropriate. These definitions
/// are reminiscent of the ones defined by POSIX.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub struct FileOpenFlags: i32 {
pub struct FileOpenFlags: c_int {
/// Open file in read only mode.
const READ = 0x1;
/// Open file in write only mode.
Expand Down
2 changes: 1 addition & 1 deletion core/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ impl SeekFrom {
}
}

pub fn whence(self) -> i32 {
pub fn whence(self) -> c_int {
match self {
SeekFrom::Start(_) => 0,
SeekFrom::End(_) => 2,
Expand Down
Loading