summaryrefslogtreecommitdiff
path: root/lib/Numeric/GSL/Special/Internal.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2007-11-12 12:24:12 +0000
committerAlberto Ruiz <aruiz@um.es>2007-11-12 12:24:12 +0000
commit25d7892ac78f0f1a4fda538dd35430ebff02baaa (patch)
tree170572a869a5d73cd09bdf39b17fbb37b6e451fd /lib/Numeric/GSL/Special/Internal.hs
parent33a9909d0d59f468039597c405306b8d5fa9e008 (diff)
withMatrix
Diffstat (limited to 'lib/Numeric/GSL/Special/Internal.hs')
-rw-r--r--lib/Numeric/GSL/Special/Internal.hs4
1 files changed, 2 insertions, 2 deletions
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
45createSFR :: Storable a => String -> (Ptr a -> IO Int) -> (a, a) 45createSFR :: Storable a => String -> (Ptr a -> IO Int) -> (a, a)
46createSFR s f = unsafePerformIO $ do 46createSFR s f = unsafePerformIO $ do
47 p <- mallocArray 2 47 p <- mallocArray 2
48 f p // check s [] 48 f p // check s
49 [val,err] <- peekArray 2 p 49 [val,err] <- peekArray 2 p
50 free p 50 free p
51 return (val,err) 51 return (val,err)
@@ -60,7 +60,7 @@ createSFR_E10 s f = unsafePerformIO $ do
60 let sd = sizeOf (0::Double) 60 let sd = sizeOf (0::Double)
61 let si = sizeOf (0::Int) 61 let si = sizeOf (0::Int)
62 p <- mallocBytes (2*sd + si) 62 p <- mallocBytes (2*sd + si)
63 f p // check s [] 63 f p // check s
64 val <- peekByteOff p 0 64 val <- peekByteOff p 0
65 err <- peekByteOff p sd 65 err <- peekByteOff p sd
66 expo <- peekByteOff p (2*sd) 66 expo <- peekByteOff p (2*sd)