{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE UnliftedFFITypes #-}
module Data.Text.Internal.Validate.Simd
( c_is_valid_utf8_ptr_unsafe
, c_is_valid_utf8_ptr_safe
, c_is_valid_utf8_bytearray_unsafe
, c_is_valid_utf8_bytearray_safe
) where
import Data.Word (Word8)
import Foreign.C.Types (CSize(..),CInt(..))
import GHC.Exts (Ptr,ByteArray#)
foreign import ccall unsafe "_hs_text_is_valid_utf8" c_is_valid_utf8_ptr_unsafe
:: Ptr Word8
-> CSize
-> IO CInt
foreign import ccall safe "_hs_text_is_valid_utf8" c_is_valid_utf8_ptr_safe
:: Ptr Word8
-> CSize
-> IO CInt
foreign import ccall unsafe "_hs_text_is_valid_utf8_offset" c_is_valid_utf8_bytearray_unsafe
:: ByteArray#
-> CSize
-> CSize
-> IO CInt
foreign import ccall safe "_hs_text_is_valid_utf8_offset" c_is_valid_utf8_bytearray_safe
:: ByteArray#
-> CSize
-> CSize
-> IO CInt