[Prev][Next][Index][Thread]
C FFI question
-
To: info-dylan@ai.mit.edu
-
Subject: C FFI question
-
From: oodl@my-deja.com
-
Date: Fri, 18 Aug 2000 17:15:01 -0400 (EDT)
-
Organization: Deja.com - Before you buy.
-
Xref: traf.lcs.mit.edu comp.lang.dylan:12644
Hi,
In Functional Developer, I want to pass a buffer of unsigned chars to a
C function, but I can't figure out how to do it. There doesn't seem to
be any documention on how to do this task.
define C-function sendpacket
parameter pdu :: <C-unsigned-char*>;
parameter length :: <C-unsigned-short>;
c-name: "sendpacket";
end;
let data = "hel\<00>lo";
sendpacket(data, data.size); // should send out six bytes
Can someone give me a hint?
thanks
Sent via Deja.com http://www.deja.com/
Before you buy.
Follow-Ups: