[cffi-devel] Re: Need foreign string method for translate-into-foreign-memory?

Liam Healy lnp at healy.washington.dc.us
Wed Oct 16 15:03:32 UTC 2013


Indeed, I first approached it this way. But the length needs to be
calculated somewhere, and making it here has the benefit of preserving
the arglist of translate-into-foreign-memory which is parallel to
translate-to-foreign by design. If you think this works, I will commit
it.

Liam

On Tue, Oct 15, 2013 at 6:02 PM, Luís Oliveira
<loliveira at common-lisp.net> wrote:
> On Tue, Oct 15, 2013 at 3:24 AM, Liam Healy <lnp at healy.washington.dc.us> wrote:
>> How does this look?
>
> It looks overly complicated. It should be a single call to
> LISP-STRING-TO-FOREIGN... Except we need to know the size of the
> target foreign memory. Guess we need to add an optional length slot to
> the string type, and this method needs to assert its existence.
>
> --
> Luís Oliveira
> http://kerno.org/~luis/



More information about the cffi-devel mailing list