X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Foreign%2FMarshal%2FAlloc.hs;h=eb4b04b5da3ee9f2b62ff6970b3acfc1236c20a0;hb=9fa9bc17072a58c0bae2cce4764d38677e96ac29;hp=ce5f1c301e6366e533a5d785f6b8ec3697f5ba3b;hpb=3d39b8130899c46c9c96b941fddb4e4784e860dc;p=ghc-base.git diff --git a/Foreign/Marshal/Alloc.hs b/Foreign/Marshal/Alloc.hs index ce5f1c3..eb4b04b 100644 --- a/Foreign/Marshal/Alloc.hs +++ b/Foreign/Marshal/Alloc.hs @@ -1,6 +1,6 @@ {-# OPTIONS -fno-implicit-prelude #-} ----------------------------------------------------------------------------- --- +-- | -- Module : Foreign.Marshal.Alloc -- Copyright : (c) The FFI task force 2001 -- License : BSD-style (see the file libraries/core/LICENSE) @@ -9,7 +9,7 @@ -- Stability : provisional -- Portability : portable -- --- $Id: Alloc.hs,v 1.3 2001/08/17 12:50:34 simonmar Exp $ +-- $Id: Alloc.hs,v 1.6 2002/04/24 16:31:44 simonmar Exp $ -- -- Marshalling support: basic routines for memory allocation -- @@ -39,7 +39,6 @@ import GHC.Real import GHC.Ptr import GHC.Err import GHC.Base -import GHC.Prim #endif @@ -125,6 +124,6 @@ failWhenNULL name f = do -- basic C routines needed for memory allocation -- -foreign import "malloc" unsafe _malloc :: CSize -> IO (Ptr a) -foreign import "realloc" unsafe _realloc :: Ptr a -> CSize -> IO (Ptr a) -foreign import "free" unsafe _free :: Ptr a -> IO () +foreign import ccall unsafe "malloc" _malloc :: CSize -> IO (Ptr a) +foreign import ccall unsafe "realloc" _realloc :: Ptr a -> CSize -> IO (Ptr a) +foreign import ccall unsafe "free" _free :: Ptr a -> IO ()