module Foreign.LibFFI.Internal where
import Data.Int
import Data.Word
import Foreign.C.Types
import Foreign.Ptr
import Foreign.Storable
data CValue
data CType
data CIF
type C_ffi_status = (Word32)
type C_ffi_abi = (Word32)
ffi_default_abi :: C_ffi_abi
ffi_default_abi = 1
ffi_ok :: C_ffi_status
ffi_ok = 0
sizeOf_cif :: Int
sizeOf_cif = (24)
sizeOf_ffi_type :: Int
sizeOf_ffi_type = (12)
init_ffi_type :: Ptr CType -> Ptr (Ptr CType) -> IO ()
init_ffi_type cType cTypes = do
((\hsc_ptr -> pokeByteOff hsc_ptr 0)) cType (0 :: CSize)
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) cType (0 :: CUShort)
((\hsc_ptr -> pokeByteOff hsc_ptr 6)) cType ((13) :: CUShort)
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) cType cTypes
foreign import ccall safe ffi_prep_cif
:: Ptr CIF -> C_ffi_abi -> CUInt -> Ptr CType -> Ptr (Ptr CType) -> IO C_ffi_status
foreign import ccall safe ffi_call
:: Ptr CIF -> FunPtr a -> Ptr CValue -> Ptr (Ptr CValue) -> IO ()