Skip to content

Commit 099b0ed

Browse files
authored
Replace std::os::raw with std::ffi (#540)
1 parent dbc841e commit 099b0ed

File tree

5 files changed

+6
-8
lines changed

5 files changed

+6
-8
lines changed

src/array.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
//! [ndarray]: https://numpy.org/doc/stable/reference/arrays.ndarray.html
44
55
use std::{
6+
ffi::{c_int, c_void},
67
marker::PhantomData,
7-
mem,
8-
os::raw::{c_int, c_void},
9-
ptr, slice,
8+
mem, ptr, slice,
109
};
1110

1211
use ndarray::{

src/borrow/shared.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use std::collections::hash_map::Entry;
2-
use std::ffi::{c_void, CString};
2+
use std::ffi::{c_char, c_int, c_void, CString};
33
use std::mem::forget;
4-
use std::os::raw::{c_char, c_int};
54
use std::ptr::NonNull;
65
use std::slice::from_raw_parts;
76
use std::sync::Mutex;

src/convert.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Defines conversion traits between Rust types and NumPy data types.
22
3-
use std::{mem, os::raw::c_int, ptr};
3+
use std::{ffi::c_int, mem, ptr};
44

55
use ndarray::{ArrayBase, Data, Dim, Dimension, IntoDimension, Ix1, OwnedRepr};
66
use pyo3::{Bound, Python};

src/dtype.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
use std::ffi::{c_int, c_long, c_longlong, c_short, c_uint, c_ulong, c_ulonglong, c_ushort};
12
use std::mem::size_of;
2-
use std::os::raw::{c_int, c_long, c_longlong, c_short, c_uint, c_ulong, c_ulonglong, c_ushort};
33
use std::ptr;
44

55
#[cfg(feature = "half")]

src/strings.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
//! [ucs4]: https://numpy.org/doc/stable/reference/c-api/dtype.html#c.NPY_UNICODE
55
66
use std::collections::hash_map::Entry;
7+
use std::ffi::c_char;
78
use std::fmt;
89
use std::mem::size_of;
9-
use std::os::raw::c_char;
1010
use std::str;
1111
use std::sync::Mutex;
1212

0 commit comments

Comments
 (0)