Skip to content
Commit b41e37be authored by Liam M. Healy's avatar Liam M. Healy
Browse files

Tests for CFFI-FSBV libffi; fix return value translation in ffcall-body-libffi

Tests fsbv.1 and fsbv.2 added that test foreign structure call and
return by value.  This includes the C file and addition to makefile to
generate the appropriate library, libfsbv.  So that the tests are
properly defined, load cffi-fsbv and then cffi-tests.  Both tests
should pass.  The test returning a structure, fsbv.2, exposed an error
in the form generated by ffcall-body-libffi; because it always
generated a mem-aref on the return value, the subsequent
translate-from-foreign was effectively making a double translation.
Thus, this form generation has been conditionalized so that if
translate-from-foreign will not be applied (e.g., built-in-type) to
call mem-aref, otherwise just return the pointer.
parent 4064d278
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment