Skip to content

Commit 293655b

Browse files
committed
use platform dependent c_char instead of hardcoded i8
1 parent 3e13736 commit 293655b

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

lax/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ 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"
3738

3839
[dependencies.intel-mkl-src]
3940
version = "0.8.1"

lax/src/flags.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ impl UPLO {
1717
}
1818

1919
/// To use Fortran LAPACK API in lapack-sys crate
20-
pub fn as_ptr(&self) -> *const i8 {
21-
self as *const UPLO as *const i8
20+
pub fn as_ptr(&self) -> *const libc::c_char {
21+
self as *const UPLO as *const libc::c_char
2222
}
2323
}
2424

@@ -32,8 +32,8 @@ pub enum Transpose {
3232

3333
impl Transpose {
3434
/// To use Fortran LAPACK API in lapack-sys crate
35-
pub fn as_ptr(&self) -> *const i8 {
36-
self as *const Transpose as *const i8
35+
pub fn as_ptr(&self) -> *const libc::c_char {
36+
self as *const Transpose as *const libc::c_char
3737
}
3838
}
3939

@@ -55,8 +55,8 @@ impl NormType {
5555
}
5656

5757
/// To use Fortran LAPACK API in lapack-sys crate
58-
pub fn as_ptr(&self) -> *const i8 {
59-
self as *const NormType as *const i8
58+
pub fn as_ptr(&self) -> *const libc::c_char {
59+
self as *const NormType as *const libc::c_char
6060
}
6161
}
6262

@@ -87,8 +87,8 @@ impl JobEv {
8787
}
8888

8989
/// To use Fortran LAPACK API in lapack-sys crate
90-
pub fn as_ptr(&self) -> *const i8 {
91-
self as *const JobEv as *const i8
90+
pub fn as_ptr(&self) -> *const libc::c_char {
91+
self as *const JobEv as *const libc::c_char
9292
}
9393
}
9494

@@ -117,8 +117,8 @@ impl JobSvd {
117117
}
118118
}
119119

120-
pub fn as_ptr(&self) -> *const i8 {
121-
self as *const JobSvd as *const i8
120+
pub fn as_ptr(&self) -> *const libc::c_char {
121+
self as *const JobSvd as *const libc::c_char
122122
}
123123
}
124124

@@ -133,7 +133,7 @@ pub enum Diag {
133133
}
134134

135135
impl Diag {
136-
pub fn as_ptr(&self) -> *const i8 {
137-
self as *const Diag as *const i8
136+
pub fn as_ptr(&self) -> *const libc::c_char {
137+
self as *const Diag as *const libc::c_char
138138
}
139139
}

0 commit comments

Comments
 (0)