packages feed

fontconfig-pure 0.2.0.0 → 0.2.0.1

raw patch · 4 files changed

+15/−9 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Graphics/Text/Font/Choose/CharSet.hs view
@@ -8,7 +8,8 @@ import Foreign.Ptr import Control.Exception (bracket) import Control.Monad (forM)-import Foreign.Marshal.Alloc (alloca, allocaBytes)+import Foreign.Marshal.Alloc (alloca)+import Foreign.Marshal.Array (allocaArray) import GHC.Base (unsafeChr) import Data.Char (ord, isHexDigit) import Numeric (readHex)@@ -61,10 +62,10 @@ thawCharSet :: CharSet_ -> IO CharSet thawCharSet chars'     | chars' == nullPtr = return Set.empty-    | otherwise = allocaBytes fcCHARSET_MAP_SIZE $ \iter' -> alloca $ \next' -> do+    | otherwise = allocaArray fcCHARSET_MAP_SIZE $ \iter' -> alloca $ \next' -> do         first <- fcCharSetFirstPage chars' iter' next'         let go = do-                ch <- fcCharSetNextPage chars' iter' next';+                ch <- fcCharSetNextPage chars' iter' next'                 if ch == maxBound then return []                 else do                     chs <- go@@ -72,9 +73,9 @@         if first == maxBound then return Set.empty else do             rest <- go             return $ Set.fromList $ map (unsafeChr . fromIntegral) (first:rest)-foreign import ccall "FcCharSetFirstPage" fcCharSetFirstPage ::+foreign import ccall "my_FcCharSetFirstPage" fcCharSetFirstPage ::     CharSet_ -> Ptr Word32 -> Ptr Word32 -> IO Word32-foreign import ccall "FcCharSetNextPage" fcCharSetNextPage ::+foreign import ccall "my_FcCharSetNextPage" fcCharSetNextPage ::     CharSet_ -> Ptr Word32 -> Ptr Word32 -> IO Word32 foreign import ccall "my_FcCHARSET_MAP_SIZE" fcCHARSET_MAP_SIZE :: Int 
Graphics/Text/Font/Choose/FontSet.hs view
@@ -55,8 +55,6 @@  thawFontSet :: FontSet_ -> IO FontSet thawFontSet fonts' = do-    -- Very hacky, but these debug statements must be in here to avoid segfaults.-    -- FIXME: Is there an alternative?     n <- get_fontSet_nfont fonts'     if n == 0 then return []     else
cbits/pattern.c view
@@ -2,7 +2,14 @@ #include <stddef.h>  int my_FcCHARSET_MAP_SIZE() {-    return FC_CHARSET_MAP_SIZE*sizeof(FcChar32);+    return FC_CHARSET_MAP_SIZE;+}++FcChar32 my_FcCharSetFirstPage(const FcCharSet *a, FcChar32 *map, FcChar32 *next) {+    return FcCharSetFirstPage(a, map, next);+}+FcChar32 my_FcCharSetNextPage(const FcCharSet *a, FcChar32 *map, FcChar32 *next) {+    return FcCharSetNextPage(a, map, next); }  FcBool my_FcPatternAdd(FcPattern *p, const char *object,
fontconfig-pure.cabal view
@@ -10,7 +10,7 @@ -- PVP summary:      +-+------- breaking API changes --                   | | +----- non-breaking API additions --                   | | | +--- code changes with no API change-version:             0.2.0.0+version:             0.2.0.1  -- A short (one-line) description of the package. synopsis:            Pure-functional language bindings to FontConfig