[Prev][Next][Index][Thread]

Re: C FFI question



oodl@my-deja.com writes:

> 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.

What about something like:

  let data = as(<byte-string>, "hel\<00>lo"); 
  sendpacket(c-type-cast(<c-unsigned-char*>, data), data.size);

I haven't tried it but it may work. I don't even know if the cast is
necessary.

Chris.
-- 
http://www.double.co.nz/dylan



Follow-Ups: References: