~alcinnz/fontconfig-pure

541a5e01b94b6bd6dbc322b89dc8a161bf32e598 — Adrian Cochrane 1 year, 1 month ago 8bd1828
Examine only 8bits for a FcValue's typetag.
1 files changed, 2 insertions(+), 2 deletions(-)

M Graphics/Text/Font/Choose/Value.hs
M Graphics/Text/Font/Choose/Value.hs => Graphics/Text/Font/Choose/Value.hs +2 -2
@@ 18,7 18,7 @@ import Foreign.C.String (withCString, peekCString)

import GHC.Generics (Generic)
import Data.Hashable (Hashable)
import Graphics.Text.Font.Choose.Result (throwNull, Error(ErrTypeMismatch))
import Graphics.Text.Font.Choose.Result (Word8, throwNull, Error(ErrTypeMismatch))

-- | A dynamic type system for `Pattern`s.
data Value = ValueVoid


@@ 148,7 148,7 @@ withMatrix (V2 (V2 xx yx) (V2 xy yy)) cb = allocaBytes mat22Size $ \mat' -> do

thawValue :: Value_ -> IO (Maybe Value)
thawValue ptr = do
    kind <- peek ptr
    kind <- peek $ castPtr ptr :: IO Word8
    let val' = castPtr (ptr `advancePtr` 1)
    case kind of
        0 -> return $ Just ValueVoid