Skip to content

Commit

Permalink
Handle small integer return types correctly in callbacks on big-endia…
Browse files Browse the repository at this point in the history
…n platforms.
  • Loading branch information
yallop committed Jun 18, 2016
1 parent 9f3cb97 commit d6c200a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ctypes-foreign-base/ffi_call_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ static void callback_handler_with_lock(ffi_cif *cif,

/* now store the return value */
assert (Tag_val(boxedfn) == Done);
argptr = CTYPES_FROM_PTR(ret);
argptr = CTYPES_FROM_PTR(ret + ffi_return_type_adjustment(cif->rtype));
caml_callback(Field(boxedfn, 0), argptr);

CAMLreturn0;
Expand Down

0 comments on commit d6c200a

Please sign in to comment.