Hello community, here is the log from the commit of package ghc-regex-pcre-builtin for openSUSE:Factory checked in at 2020-10-23 15:14:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-regex-pcre-builtin (Old) and /work/SRC/openSUSE:Factory/.ghc-regex-pcre-builtin.new.3463 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-regex-pcre-builtin" Fri Oct 23 15:14:35 2020 rev:12 rq:842761 version:0.95.1.3.8.43 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-regex-pcre-builtin/ghc-regex-pcre-builtin.changes 2020-08-28 21:36:59.376769610 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-regex-pcre-builtin.new.3463/ghc-regex-pcre-builtin.changes 2020-10-23 15:14:40.922143925 +0200 @@ -1,0 +2,10 @@ +Mon Oct 19 02:01:22 UTC 2020 - psim...@suse.com + +- Update regex-pcre-builtin to version 0.95.1.3.8.43. + ## 0.95.1.3.8.43 + - Version bump to reflect pcre version (8.43) and to have Hackage upgrade from 0.95.1.2.8.43 which does not include #15 + + ## 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) + +------------------------------------------------------------------- Old: ---- regex-pcre-builtin-0.95.1.2.8.43.tar.gz New: ---- regex-pcre-builtin-0.95.1.3.8.43.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-regex-pcre-builtin.spec ++++++ --- /var/tmp/diff_new_pack.vL4jYa/_old 2020-10-23 15:14:42.266144574 +0200 +++ /var/tmp/diff_new_pack.vL4jYa/_new 2020-10-23 15:14:42.282144582 +0200 @@ -18,7 +18,7 @@ %global pkg_name regex-pcre-builtin Name: ghc-%{pkg_name} -Version: 0.95.1.2.8.43 +Version: 0.95.1.3.8.43 Release: 0 Summary: PCRE Backend for "Text.Regex" (regex-base) License: BSD-3-Clause ++++++ regex-pcre-builtin-0.95.1.2.8.43.tar.gz -> regex-pcre-builtin-0.95.1.3.8.43.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/regex-pcre-builtin-0.95.1.2.8.43/ChangeLog.md new/regex-pcre-builtin-0.95.1.3.8.43/ChangeLog.md --- old/regex-pcre-builtin-0.95.1.2.8.43/ChangeLog.md 2020-04-16 07:08:54.000000000 +0200 +++ new/regex-pcre-builtin-0.95.1.3.8.43/ChangeLog.md 2001-09-09 03:46:40.000000000 +0200 @@ -1,5 +1,11 @@ See also http://pvp.haskell.org/faq +## 0.95.1.3.8.43 +- Version bump to reflect pcre version (8.43) and to have Hackage upgrade from 0.95.1.2.8.43 which does not include #15 + +## 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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/regex-pcre-builtin-0.95.1.2.8.43/regex-pcre-builtin.cabal new/regex-pcre-builtin-0.95.1.3.8.43/regex-pcre-builtin.cabal --- old/regex-pcre-builtin-0.95.1.2.8.43/regex-pcre-builtin.cabal 2020-04-16 07:08:54.000000000 +0200 +++ new/regex-pcre-builtin-0.95.1.3.8.43/regex-pcre-builtin.cabal 2001-09-09 03:46:40.000000000 +0200 @@ -1,5 +1,5 @@ Name: regex-pcre-builtin -Version: 0.95.1.2.8.43 +Version: 0.95.1.3.8.43 Cabal-Version: >=1.10 stability: Seems to work, passes a few tests build-type: Simple diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/regex-pcre-builtin-0.95.1.2.8.43/src/Text/Regex/PCRE/Text.hs new/regex-pcre-builtin-0.95.1.3.8.43/src/Text/Regex/PCRE/Text.hs --- old/regex-pcre-builtin-0.95.1.2.8.43/src/Text/Regex/PCRE/Text.hs 2020-04-16 07:08:54.000000000 +0200 +++ new/regex-pcre-builtin-0.95.1.3.8.43/src/Text/Regex/PCRE/Text.hs 2001-09-09 03:46:40.000000000 +0200 @@ -50,6 +50,9 @@ ) 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 @@ -154,7 +157,9 @@ {-# INLINE asCString #-} asCString :: T.Text -> (CString->IO a) -> IO a -asCString = B.unsafeUseAsCString . T.encodeUtf8 +asCString t + | T.null t || (ord (T.last t) /= 0) = B.useAsCString $ T.encodeUtf8 t + | otherwise = B.unsafeUseAsCString $ T.encodeUtf8 t {-# INLINE asCStringLen #-} asCStringLen :: T.Text -> (CStringLen->IO a) -> IO a