Skip to content

Commit

Permalink
Fix FFI seeds type
Browse files Browse the repository at this point in the history
  • Loading branch information
ogxd committed Nov 17, 2023
1 parent 3a2d4e6 commit 35d2358
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ffi/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
use core::slice;

#[no_mangle]
pub unsafe extern "C" fn gxhash32(buf: *const (), len: usize, seed: i32) -> u32 {
pub unsafe extern "C" fn gxhash32(buf: *const (), len: usize, seed: i64) -> u32 {
let data: &[u8] = slice::from_raw_parts(buf as *const u8, len);
gxhash::gxhash32(data, seed)
}

#[no_mangle]
pub unsafe extern "C" fn gxhash64(buf: *const (), len: usize, seed: i32) -> u64 {
pub unsafe extern "C" fn gxhash64(buf: *const (), len: usize, seed: i64) -> u64 {
let data: &[u8] = slice::from_raw_parts(buf as *const u8, len);
gxhash::gxhash64(data, seed)
}

0 comments on commit 35d2358

Please sign in to comment.