Skip to content

Commit 80993a6

Browse files
committed
fix compile errors
1 parent a3b8324 commit 80993a6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/object_file.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ impl Section {
111111
pub fn get_name(&self) -> Option<&CStr> {
112112
let name = unsafe {
113113
LLVMGetSectionName(self.section)
114-
}
114+
};
115115
if !name.is_null() {
116-
CStr::from_ptr(name)
116+
Some(unsafe { CStr::from_ptr(name) })
117117
} else {
118118
None
119119
}
@@ -310,9 +310,9 @@ impl Symbol {
310310
pub fn get_name(&self) -> Option<&CStr> {
311311
let name = unsafe {
312312
LLVMGetSymbolName(self.symbol)
313-
}
313+
};
314314
if !name.is_null() {
315-
CStr::from_ptr(name)
315+
Some(unsafe { CStr::from_ptr(name) })
316316
} else {
317317
None
318318
}

0 commit comments

Comments
 (0)