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

use platform dependent c_char instead of hardcoded i8 #354

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions lax/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ cauchy = "0.4.0"
num-traits = "0.2.14"
lapack-sys = "0.14.0"
katexit = "0.1.2"
libc = "0.2.142"

[dependencies.intel-mkl-src]
version = "0.8.1"
Expand Down
24 changes: 12 additions & 12 deletions lax/src/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ impl UPLO {
}

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

Expand All @@ -32,8 +32,8 @@ pub enum Transpose {

impl Transpose {
/// To use Fortran LAPACK API in lapack-sys crate
pub fn as_ptr(&self) -> *const i8 {
self as *const Transpose as *const i8
pub fn as_ptr(&self) -> *const libc::c_char {
self as *const Transpose as *const libc::c_char
}
}

Expand All @@ -55,8 +55,8 @@ impl NormType {
}

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

Expand Down Expand Up @@ -87,8 +87,8 @@ impl JobEv {
}

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

Expand Down Expand Up @@ -117,8 +117,8 @@ impl JobSvd {
}
}

pub fn as_ptr(&self) -> *const i8 {
self as *const JobSvd as *const i8
pub fn as_ptr(&self) -> *const libc::c_char {
self as *const JobSvd as *const libc::c_char
}
}

Expand All @@ -133,7 +133,7 @@ pub enum Diag {
}

impl Diag {
pub fn as_ptr(&self) -> *const i8 {
self as *const Diag as *const i8
pub fn as_ptr(&self) -> *const libc::c_char {
self as *const Diag as *const libc::c_char
}
}