{-# LINE 1 "src/Notmuch/Talloc.chs" #-}
{-# LANGUAGE ForeignFunctionInterface #-}
module Notmuch.Talloc where
import qualified Foreign.C.Types as C2HSImp
import qualified Foreign.Ptr as C2HSImp
import Foreign (Ptr, castPtr, nullPtr)
detachPtr :: Ptr a -> IO (Ptr a)
detachPtr :: forall a. Ptr a -> IO (Ptr a)
detachPtr Ptr a
ptr =
Ptr () -> Ptr a
forall a b. Ptr a -> Ptr b
castPtr (Ptr () -> Ptr a) -> IO (Ptr ()) -> IO (Ptr a)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Ptr () -> Ptr () -> Ptr CChar -> IO (Ptr ())
_talloc_steal_loc Ptr ()
forall a. Ptr a
nullPtr (Ptr a -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr Ptr a
ptr) Ptr CChar
forall a. Ptr a
nullPtr
foreign import ccall unsafe "Notmuch/Talloc.chs.h _talloc_steal_loc"
_talloc_steal_loc :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO (C2HSImp.Ptr ())))))