Malcolm Wallace wrote:
> > > > foreign import ccall "math.h signgam" signgamC :: IO Int
> >
> > signgam is an "int" variable, but this assumes that it is a function
> > of type "int signgam(void)".
> >
> > Write a C wrapper "int get_signgam(void) { return signgam; }" and
> > import that.
> 
> Or alternatively, foreign import the address of the int and read it
> directly with 'peek'.

Thanks for the clarification.  I went with the second option, and that
works great.

-- 
Matthew Donadio ([EMAIL PROTECTED])
_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to