On Tue, Oct 1, 2013 at 4:17 AM, Liam Healy lnp@healy.washington.dc.us wrote:
Based on this report http://paste.lisp.org/display/139232 it seems like we need a method translate-into-foreign-memory for foreign-string in order that cffi-libffi works when there are both structures by value and strings in the arguments (or return). I looked at the code for translate-to-foreign for inspiration, but I'm not clear on how strings work. Is this simply a memcpy?
Not quite a memcpy since we need to convert from Lisp characters to one or more bytes depending on the desired target encoding. LISP-STRING-TO-FOREIGN is the function for job.
Cheers,