Skip to content

Commit

Permalink
fix: Fixed broken FFI code on Windows. (#97)
Browse files Browse the repository at this point in the history
Haha this is why we need Windows CI jobs. A prior
commit missed updating two function calls in the
Windows FFI code, causing compilation issues. This
commit fixes it.

Signed-off-by: Andrew Lilley Brinker <[email protected]>
  • Loading branch information
alilleybrinker authored Feb 14, 2024
1 parent 9e85a3c commit c430359
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gitoid/src/ffi/gitoid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ macro_rules! generate_gitoid_ffi_for_hash {
let output = catch_panic(|| {
let file = unsafe { File::from_raw_handle(handle) };
let reader = BufReader::new(file);
let gitoid = GitOid::<$hash_ty, $object_ty>::new_from_reader(reader)?;
let gitoid = GitOid::<$hash_ty, $object_ty>::from_reader(reader)?;
let boxed = Box::new(gitoid);
Ok(Box::into_raw(boxed) as *const _)
});
Expand All @@ -267,7 +267,7 @@ macro_rules! generate_gitoid_ffi_for_hash {
let file = unsafe { File::from_raw_handle(handle) };
let expected_length = expected_length as usize;
let reader = BufReader::new(file);
let gitoid = GitOid::<$hash_ty, $object_ty>::new_from_reader_with_expected_length(reader, expected_length)?;
let gitoid = GitOid::<$hash_ty, $object_ty>::from_reader_with_expected_length(reader, expected_length)?;
let boxed = Box::new(gitoid);
Ok(Box::into_raw(boxed) as *const _)
});
Expand Down

0 comments on commit c430359

Please sign in to comment.