Skip to content

Commit cef6aa5

Browse files
committed
remove dependency on libc
1 parent 293655b commit cef6aa5

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

lax/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ cauchy = "0.4.0"
3434
num-traits = "0.2.14"
3535
lapack-sys = "0.14.0"
3636
katexit = "0.1.2"
37-
libc = "0.2.142"
3837

3938
[dependencies.intel-mkl-src]
4039
version = "0.8.1"

lax/src/flags.rs

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//! Charactor flags, e.g. `'T'`, used in LAPACK API
2+
use std::ffi::c_char;
23

34
/// Upper/Lower specification for seveal usages
45
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
@@ -17,8 +18,8 @@ impl UPLO {
1718
}
1819

1920
/// To use Fortran LAPACK API in lapack-sys crate
20-
pub fn as_ptr(&self) -> *const libc::c_char {
21-
self as *const UPLO as *const libc::c_char
21+
pub fn as_ptr(&self) -> *const c_char {
22+
self as *const UPLO as *const c_char
2223
}
2324
}
2425

@@ -32,8 +33,8 @@ pub enum Transpose {
3233

3334
impl Transpose {
3435
/// To use Fortran LAPACK API in lapack-sys crate
35-
pub fn as_ptr(&self) -> *const libc::c_char {
36-
self as *const Transpose as *const libc::c_char
36+
pub fn as_ptr(&self) -> *const c_char {
37+
self as *const Transpose as *const c_char
3738
}
3839
}
3940

@@ -55,8 +56,8 @@ impl NormType {
5556
}
5657

5758
/// To use Fortran LAPACK API in lapack-sys crate
58-
pub fn as_ptr(&self) -> *const libc::c_char {
59-
self as *const NormType as *const libc::c_char
59+
pub fn as_ptr(&self) -> *const c_char {
60+
self as *const NormType as *const c_char
6061
}
6162
}
6263

@@ -87,8 +88,8 @@ impl JobEv {
8788
}
8889

8990
/// To use Fortran LAPACK API in lapack-sys crate
90-
pub fn as_ptr(&self) -> *const libc::c_char {
91-
self as *const JobEv as *const libc::c_char
91+
pub fn as_ptr(&self) -> *const c_char {
92+
self as *const JobEv as *const c_char
9293
}
9394
}
9495

@@ -117,8 +118,8 @@ impl JobSvd {
117118
}
118119
}
119120

120-
pub fn as_ptr(&self) -> *const libc::c_char {
121-
self as *const JobSvd as *const libc::c_char
121+
pub fn as_ptr(&self) -> *const c_char {
122+
self as *const JobSvd as *const c_char
122123
}
123124
}
124125

@@ -133,7 +134,7 @@ pub enum Diag {
133134
}
134135

135136
impl Diag {
136-
pub fn as_ptr(&self) -> *const libc::c_char {
137-
self as *const Diag as *const libc::c_char
137+
pub fn as_ptr(&self) -> *const c_char {
138+
self as *const Diag as *const c_char
138139
}
139140
}

0 commit comments

Comments
 (0)