X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Flib%2Fstd%2FPrelCString.lhs;h=1d2ef13ad61ea18bd7fabca8706089a8b0ed8985;hb=5b90821ab7fc1b7e3a773506dcff8aa92d7fce7f;hp=4fe13fd5cf6e97180a4ff84bdd95e9b0cbf5d60b;hpb=64499dfb10860daf712c7f522b790f94658ea9fb;p=ghc-hetmet.git diff --git a/ghc/lib/std/PrelCString.lhs b/ghc/lib/std/PrelCString.lhs index 4fe13fd..1d2ef13 100644 --- a/ghc/lib/std/PrelCString.lhs +++ b/ghc/lib/std/PrelCString.lhs @@ -1,5 +1,5 @@ % ----------------------------------------------------------------------------- -% $Id: PrelCString.lhs,v 1.4 2001/05/18 16:54:05 simonmar Exp $ +% $Id: PrelCString.lhs,v 1.5 2001/08/10 13:48:06 simonmar Exp $ % % (c) The FFI task force, 2000 % @@ -124,17 +124,4 @@ castCCharToChar ch = unsafeChr (fromIntegral (fromIntegral ch :: Word8)) castCharToCChar :: Char -> CChar castCharToCChar ch = fromIntegral (ord ch) - - --- unsafe CStrings --- --------------- - -withUnsafeCString :: String -> (UnsafeCString -> IO a) -> IO a -#if __GLASGOW_HASKELL__ -newtype UnsafeCString = UnsafeCString (ByteArray Int) -withUnsafeCString s f = f (UnsafeCString (packString s)) -#else -newtype UnsafeCString = UnsafeCString (Ptr CChar) -withUnsafeCString s f = withCString s (\p -> f (UnsafeCString p)) -#endif \end{code}