mirror of
https://github.com/denoland/deno.git
synced 2025-03-04 01:44:26 -05:00
fix(napi) use c_char instead of hardcoding i8 to avoid incompatibility with aarch64 (#17458)
Quick one, compatibility fix for [aarch64 builds](https://github.com/LukeChannings/deno-arm64).
This commit is contained in:
parent
f2a5f6d7f0
commit
1a792f8805
1 changed files with 3 additions and 1 deletions
|
@ -9,6 +9,7 @@ use napi_sys::TypedarrayType;
|
||||||
use napi_sys::ValueType::napi_number;
|
use napi_sys::ValueType::napi_number;
|
||||||
use napi_sys::ValueType::napi_object;
|
use napi_sys::ValueType::napi_object;
|
||||||
use napi_sys::*;
|
use napi_sys::*;
|
||||||
|
use std::os::raw::c_char;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
|
|
||||||
extern "C" fn test_multiply(
|
extern "C" fn test_multiply(
|
||||||
|
@ -103,7 +104,8 @@ extern "C" fn test_multiply(
|
||||||
assert_napi_ok!(napi_throw_error(
|
assert_napi_ok!(napi_throw_error(
|
||||||
env,
|
env,
|
||||||
ptr::null(),
|
ptr::null(),
|
||||||
"Typed array was of a type not expected by test.".as_ptr() as *const i8,
|
"Typed array was of a type not expected by test.".as_ptr()
|
||||||
|
as *const c_char,
|
||||||
));
|
));
|
||||||
return ptr::null_mut();
|
return ptr::null_mut();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue