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(napi) use c_char instead of hardcoding i8 to avoid incompatibility with aarch64 #17458

Merged
merged 1 commit into from
Jan 17, 2023
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
fix(napi) use c_char instead of hardcoding i8 to avoid incompatibilit…
…y with aarch64
  • Loading branch information
LukeChannings committed Jan 17, 2023
commit cc261dc6397f687ef4f71a6c172d777a68c9c830
4 changes: 3 additions & 1 deletion test_napi/src/typedarray.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use napi_sys::TypedarrayType;
use napi_sys::ValueType::napi_number;
use napi_sys::ValueType::napi_object;
use napi_sys::*;
use std::os::raw::c_char;
use std::ptr;

extern "C" fn test_multiply(
Expand Down Expand Up @@ -103,7 +104,8 @@ extern "C" fn test_multiply(
assert_napi_ok!(napi_throw_error(
env,
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();
}
Expand Down