Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit af2e191

Browse files
authored
Merge pull request #354 from mike-kfed/arm-cross-compile
use platform dependent c_char instead of hardcoded i8
2 parents 373192d + 7213ae8 commit af2e191

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

‎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 core::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 i8 {
21-
self as *const UPLO as *const i8
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 i8 {
36-
self as *const Transpose as *const i8
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 i8 {
59-
self as *const NormType as *const i8
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 i8 {
91-
self as *const JobEv as *const i8
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 i8 {
121-
self as *const JobSvd as *const i8
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 i8 {
137-
self as *const Diag as *const i8
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)

AltStyle によって変換されたページ (->オリジナル) /