Re: FFI kick start

2008-10-15 Thread Andy Wingo
On Tue 14 Oct 2008 11:43, john <[EMAIL PROTECTED]> writes: > I am trying to get to grips with manually wrapping C functions but > need some pointers. I have a C function: > > packedEncode *initializeEncode(char *pdu, int size) You need to create a smob type for the packedEncode data structure. Ma

Re: FFI kick start

2008-10-14 Thread Linas Vepstas
2008/10/14 john <[EMAIL PROTECTED]>: > Hi guilers... > > I would really appreciate some pointers or some > boiler plate code for handling this type of function to get me > rolling. I found that http://www.gnu.org/software/guile/manual/html_node/The-Complete-Example.html was enough to get me going

FFI kick start

2008-10-14 Thread john
Hi guilers... I am trying to get to grips with manually wrapping C functions but need some pointers. I have a C function: packedEncode *initializeEncode(char *pdu, int size) with: typedef struct { char *pdu; ... } packedEncode; It takes a pointer to some storage (char *pdu) which will be