Skip to content

Commit

Permalink
In bytecode functions expansion, add clippy annotation to allow the u…
Browse files Browse the repository at this point in the history
…nsafe pointer read
  • Loading branch information
tizoc committed Aug 27, 2023
1 parent 7cb78ba commit 825695f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1543,6 +1543,7 @@ macro_rules! expand_exported_byte_function {
pub extern "C" fn $byte_name(argv: *mut $crate::RawOCaml, argn: std::os::raw::c_int) -> $crate::expand_exported_function_return!($($rtyp)*) {
let mut i = 0usize;
$(
#[allow(clippy::not_unsafe_ptr_arg_deref)]
let $arg = unsafe { core::ptr::read(argv.add(i)) };
i += 1;
)+
Expand Down

0 comments on commit 825695f

Please sign in to comment.