packages feed

regex-posix 0.95.1 → 0.95.2

raw patch · 2 files changed

+16/−5 lines, 2 filesdep ~arraydep ~basedep ~bytestring

Dependency ranges changed: array, base, bytestring, containers

Files

Text/Regex/Posix/Wrap.hsc view
@@ -102,7 +102,7 @@ -- string.h is needed for memset  #include "myfree.h"-+          #include "string.h"  #ifndef _POSIX_C_SOURCE@@ -131,11 +131,20 @@                addForeignPtrFinalizer, Storable(peekByteOff), allocaArray,                allocaBytes, withForeignPtr,ForeignPtr,plusPtr,peekElemOff) import Foreign.Marshal.Alloc(mallocBytes)-import Foreign.C(CSize,CInt,CChar)+import Foreign.C(CChar)+#if __GLASGOW_HASKELL__ >= 703+import Foreign.C(CSize(CSize),CInt(CInt))+#else+import Foreign.C(CSize,CInt)+#endif import Foreign.C.String(peekCAString, CString) import Text.Regex.Base.RegexLike(RegexOptions(..),RegexMaker(..),RegexContext(..),MatchArray)-import qualified System.IO.Error as IOERROR(try)+-- deprecated: import qualified System.IO.Error as IOERROR(try)+import qualified Control.Exception(try,IOException) +try :: IO a -> IO (Either Control.Exception.IOException a)+try = Control.Exception.try+ type CRegex = ()   -- dummy regex_t used below to read out nsub value  -- | RegOffset is "typedef int regoff_t" on Linux and ultimately "typedef@@ -349,8 +358,10 @@ foreign import ccall unsafe "regcomp"   c_regcomp :: Ptr CRegex -> CString -> CompOption -> IO ReturnCode +{- NOT USED foreign import ccall unsafe "&regfree"   c_regfree :: FunPtr (Ptr CRegex -> IO ())+-}  foreign import ccall unsafe "regexec"   c_regexec :: Ptr CRegex -> CString -> CSize@@ -460,7 +471,7 @@ ---------- wrapCompile flags e pattern = do  nullTest pattern "wrapCompile pattern" $ do-  e_regex_ptr <- IOERROR.try $ mallocBytes (#const sizeof(regex_t)) -- ioError called if nullPtr+  e_regex_ptr <- try $ mallocBytes (#const sizeof(regex_t)) -- ioError called if nullPtr   case e_regex_ptr of     Left ioerror -> return (Left (retOk,"Text.Regex.Posix.Wrap.wrapCompile: IOError from mallocBytes(regex_t) : "++show ioerror))     Right raw_regex_ptr -> do
regex-posix.cabal view
@@ -1,7 +1,7 @@ Name:                   regex-posix -- Keep the Version below in sync with ./Text/Regex/Posix.hs value -- getVersion_Text_Regex_Posix :: Version-Version:                0.95.1+Version:                0.95.2 Cabal-Version:          >=1.2 Build-Type:             Custom License:                BSD3