11 Feb
2012
11 Feb
'12
5:59 p.m.
On Fri, 10 Feb 2012, John Meacham wrote:
foreign import ccall "math.h frexp" c_frexp :: Double -> Ptr CInt -> IO Double
-- This extension allows it to be declared as so foreign import ccall "math.h frexp" c_frexp :: Double -> (# Double, CInt #)
-- The second return value is added as the last 'exp' parameter then read out -- of the allocated memory. The contents of the memory passed into the function -- is undefined.
Nice idea - how does JHC know where the pointer parameters are? Is it possible to have the pointer arguments at the first position?