From 25d7892ac78f0f1a4fda538dd35430ebff02baaa Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Mon, 12 Nov 2007 12:24:12 +0000 Subject: withMatrix --- lib/Numeric/GSL/Special/Internal.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Numeric/GSL/Special/Internal.hs') diff --git a/lib/Numeric/GSL/Special/Internal.hs b/lib/Numeric/GSL/Special/Internal.hs index a08809b..ca36009 100644 --- a/lib/Numeric/GSL/Special/Internal.hs +++ b/lib/Numeric/GSL/Special/Internal.hs @@ -45,7 +45,7 @@ type Size_t = Int createSFR :: Storable a => String -> (Ptr a -> IO Int) -> (a, a) createSFR s f = unsafePerformIO $ do p <- mallocArray 2 - f p // check s [] + f p // check s [val,err] <- peekArray 2 p free p return (val,err) @@ -60,7 +60,7 @@ createSFR_E10 s f = unsafePerformIO $ do let sd = sizeOf (0::Double) let si = sizeOf (0::Int) p <- mallocBytes (2*sd + si) - f p // check s [] + f p // check s val <- peekByteOff p 0 err <- peekByteOff p sd expo <- peekByteOff p (2*sd) -- cgit v1.2.3