18 Dec 19:52
Foreign C with pointers
From: Luis Cabellos <zhen.sydow <at> gmail.com>
Subject: Foreign C with pointers
Newsgroups: gmane.comp.lang.haskell.glasgow.user
Date: 2007-12-18 18:54:53 GMT
Subject: Foreign C with pointers
Newsgroups: gmane.comp.lang.haskell.glasgow.user
Date: 2007-12-18 18:54:53 GMT
Hi,
I am creating a binding to an existing library (lib*.a) from Haskell.
How can i bind a function that get a pointer?
e.g: I have in the c library.
int GetData( Data * d );
The steps that i need are:
1 - create the Data in Haskell
2 - create the foreign import sentence in a lib*.hs
3 - use the Data after the call
Where can i get a good tutorial about FFI? I try
http://www.haskell.org/hdirect/ffi.html but it's too general (need i pair of examples, i think)
--
Thanks a lot, Luis Cabellos
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users <at> haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
RSS Feed