On Sat, 2013-10-19 at 15:28 -0400, Liam Healy wrote: > On Thu, Oct 17, 2013 at 9:14 AM, Luís Oliveira <luis...@gmail.com> wrote: > > > Anyway, a test using libtest (or some standard C function, if we can > > force libffi to kick in for functions that don't use structures) would > > be nice. Do you have the time/inclination to give it a go? > > How about this? In fsbv.lisp > > ;;; Combine structures by value with a string argument > (deftest fsbv.7 > (stringlenpair "abc" '(1 . 2)) > (3 . 6)) > > > and in libfsbv.c > > DLLEXPORT > struct struct_pair stringlenpair (char * string, struct struct_pair dp) > { > struct struct_pair ret; > ret.a = strlen(string)*dp.a; > ret.b = strlen(string)*dp.b; > return ret; > } > > Can you run this and see if it works? I've never figured out how to run tests.
(asdf:test-system :cffi) -- Stelian Ionescu a.k.a. fe[nl]ix Quidquid latine dictum sit, altum videtur.
signature.asc
Description: This is a digitally signed message part