fix new compilation errors in haku-wasm
This commit is contained in:
parent
bc2df73487
commit
40038d3fdc
1 changed files with 6 additions and 4 deletions
|
@ -496,22 +496,24 @@ unsafe extern "C" fn haku_num_diagnostics(instance: *const Instance) -> u32 {
|
|||
|
||||
#[unsafe(no_mangle)]
|
||||
unsafe extern "C" fn haku_diagnostic_start(instance: *const Instance, index: u32) -> u32 {
|
||||
(*instance).diagnostics2[index as usize].span().start
|
||||
(&(*instance).diagnostics2)[index as usize].span().start
|
||||
}
|
||||
|
||||
#[unsafe(no_mangle)]
|
||||
unsafe extern "C" fn haku_diagnostic_end(instance: *const Instance, index: u32) -> u32 {
|
||||
(*instance).diagnostics2[index as usize].span().end
|
||||
(&(*instance).diagnostics2)[index as usize].span().end
|
||||
}
|
||||
|
||||
#[unsafe(no_mangle)]
|
||||
unsafe extern "C" fn haku_diagnostic_message(instance: *const Instance, index: u32) -> *const u8 {
|
||||
(*instance).diagnostics2[index as usize].message().as_ptr()
|
||||
(&(*instance).diagnostics2)[index as usize]
|
||||
.message()
|
||||
.as_ptr()
|
||||
}
|
||||
|
||||
#[unsafe(no_mangle)]
|
||||
unsafe extern "C" fn haku_diagnostic_message_len(instance: *const Instance, index: u32) -> u32 {
|
||||
(*instance).diagnostics2[index as usize].message().len() as u32
|
||||
(&(*instance).diagnostics2)[index as usize].message().len() as u32
|
||||
}
|
||||
|
||||
#[unsafe(no_mangle)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue