Skip to content

Commit 906d483

Browse files
committed
make it work on aarch64
refered here for similar issue: skade/leveldb#32
1 parent 754fdf8 commit 906d483

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/object.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ impl<'a> Iterator for Symbols<'a> {
4242
type Item = Symbol<'a>;
4343
fn next(&mut self) -> Option<Symbol<'a>> {
4444
unsafe {
45-
let name = util::to_str(object::LLVMGetSymbolName(self.iter) as *mut i8);
45+
let name = util::to_str(object::LLVMGetSymbolName(self.iter) as *mut libc::c_char);
4646
let size = object::LLVMGetSymbolSize(self.iter) as usize;
4747
let address = object::LLVMGetSymbolAddress(self.iter) as usize;
4848
Some(Symbol {

src/value.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ impl Value {
6464
pub fn get_name(&self) -> Option<&str> {
6565
unsafe {
6666
let c_name = core::LLVMGetValueName(self.into());
67-
util::to_null_str(c_name as *mut i8)
67+
util::to_null_str(c_name as *mut libc::c_char)
6868
}
6969
}
7070
/// Sets the name of this value
@@ -398,4 +398,4 @@ impl GetContext for Value {
398398
fn get_context(&self) -> &Context {
399399
self.get_type().get_context()
400400
}
401-
}
401+
}

0 commit comments

Comments
 (0)