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

fix: Loosen acceptable types to support current linux build on aarch64 #415

Merged
Changes from all commits
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
8 changes: 5 additions & 3 deletions src/bam/record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// except according to those terms.

use std::convert::TryFrom;
use std::convert::TryInto;
use std::ffi;
use std::fmt;
use std::marker::PhantomData;
Expand Down Expand Up @@ -2216,7 +2217,7 @@ impl fmt::Display for CigarStringView {
pub struct BaseModificationMetadata {
pub strand: i32,
pub implicit: i32,
pub canonical: i8,
pub canonical: u8,
}

/// struct containing the internal state required to access
Expand Down Expand Up @@ -2314,7 +2315,8 @@ impl BaseModificationState<'_> {
unsafe {
let mut strand: i32 = 0;
let mut implicit: i32 = 0;
let mut canonical: i8 = 0;
// This may be i8 or u8 in hts_sys.
let mut canonical: c_char = 0;

let ret = hts_sys::bam_mods_query_type(
self.state,
Expand All @@ -2329,7 +2331,7 @@ impl BaseModificationState<'_> {
return Ok(BaseModificationMetadata {
strand,
implicit,
canonical,
canonical: canonical.try_into().unwrap(),
});
}
}
Expand Down
Loading