[Prev][Next][Index][Thread]
Re: C FFI question
In article <wkk8de3xvk.fsf@double.co.nz>,
Chris Double <chris@double.co.nz> wrote:
> The string passed to the function must be a <c-string> for this to
> work. This can be done using as():
>
> let c-data = as(<c-string>, data);
> sendpacket(c-data, c-data.size);
> destroy(c-data);
>
Thanks Chris, but a <c-string> is a zero terminated string, and that is
not what I want. The buffer that I want to pass may have \0's in it.
I'm suspect the streams library is doing what I want to do internally
for writes involving a <byte-vector>, but I don't have access to that
source code to the streams library, so I can't see how they are doing
it.
Sent via Deja.com http://www.deja.com/
Before you buy.
Follow-Ups:
References: