regex-pcre-builtin 0.95.1.1.8.44 → 0.95.1.2.8.43
raw patch · 3 files changed
+2/−10 lines, 3 files
Files
- ChangeLog.md +0/−3
- regex-pcre-builtin.cabal +1/−1
- src/Text/Regex/PCRE/Text.hs +1/−6
ChangeLog.md view
@@ -1,8 +1,5 @@ See also http://pvp.haskell.org/faq -## 0.95.1.1.8.44-- Fix: `asCString` for `Text` regexes doesn't check for null-termination, causing the compiled regex to be corrupted. (@kuribas)- ## 0.95.1.0.8.43 - Update to `regex-0.94.0.0` API
regex-pcre-builtin.cabal view
@@ -1,5 +1,5 @@ Name: regex-pcre-builtin-Version: 0.95.1.1.8.44+Version: 0.95.1.2.8.43 Cabal-Version: >=1.10 stability: Seems to work, passes a few tests build-type: Simple
src/Text/Regex/PCRE/Text.hs view
@@ -50,9 +50,6 @@ ) where import Data.Array(Array,listArray)-import Data.Char(ord)-import Control.Monad.Fail (fail)-import Prelude hiding (fail) import qualified Data.ByteString as B import qualified Data.ByteString.Unsafe as B import qualified Data.Text as T@@ -157,9 +154,7 @@ {-# INLINE asCString #-} asCString :: T.Text -> (CString->IO a) -> IO a-asCString t- | T.null t || (ord (T.last t) /= 0) = B.useAsCString $ T.encodeUtf8 t- | otherwise = B.unsafeUseAsCString $ T.encodeUtf8 t+asCString = B.unsafeUseAsCString . T.encodeUtf8 {-# INLINE asCStringLen #-} asCStringLen :: T.Text -> (CStringLen->IO a) -> IO a