From 1a8a5aef6220e1086f51fd43f7ea4b665c1ff845 Mon Sep 17 00:00:00 2001 From: Vincent Hanquez Date: Sun, 29 Mar 2015 08:59:47 +0100 Subject: [PATCH] remove useless function --- Crypto/Internal/Bytes.hs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/Crypto/Internal/Bytes.hs b/Crypto/Internal/Bytes.hs index 5c6a094..26c70a3 100644 --- a/Crypto/Internal/Bytes.hs +++ b/Crypto/Internal/Bytes.hs @@ -11,7 +11,6 @@ module Crypto.Internal.Bytes ( withByteStringPtr , tempBufCreate - , bufCreate , bufXor ) where @@ -21,7 +20,6 @@ import Foreign.ForeignPtr (withForeignPtr) import Foreign.Storable (peek, poke) import Foreign.Marshal.Alloc (allocaBytesAligned) import Data.ByteString (ByteString) -import Data.ByteString.Internal (ByteString(..), mallocByteString) import Data.Bits (xor) import Data.Word (Word8) import Data.ByteString.Internal (toForeignPtr) @@ -31,13 +29,6 @@ withByteStringPtr b f = withForeignPtr fptr $ \ptr -> f (ptr `plusPtr` off) where (fptr, off, _) = toForeignPtr b --- | Create a buffer, and turns the final resulting ByteString -bufCreate :: Int -> (Ptr Word8 -> IO ()) -> IO ByteString -bufCreate size f = do - fptr <- mallocByteString size - withForeignPtr fptr f - return $! PS fptr 0 size - -- | Create a new temporary buffer tempBufCreate :: Int -> (Ptr Word8 -> IO a) -> IO a tempBufCreate size f = allocaBytesAligned size 8 f