More C interfacing issues
Alastair Reid
reid at reid-consulting-uk.ltd.uk
Wed Jul 3 05:30:19 EDT 2002
>> > Secondly, does anyone have any suggestions on how to provide an
>> > interface to this?
>>
>> > void getyx(WINDOW *win, int y, int x);
> What's wrong with just doing this in the plain FFI?
> foreign import ccall "getyx" getyx
> :: Ptr Window -> Ptr CInt -> Ptr CInt -> IO ()
> Have I missed something?
You need at least one wrapper because getyx is a macro. Note that the
arguments are ints _not_ int*s.
--
Alastair Reid
alastair at reid-consulting-uk.ltd.uk
http://www.reid-consulting-uk.ltd.uk/alastair/
More information about the FFI
mailing list