[Fix expat misconfiguration which broke entity parsing. Stephen Blackheath **20101014103225 Ignore-this: e3e811d179cfba18744188b95e3fe37a ] hunk ./cbits/xmlparse.c 76 +/* Handle the case where memmove() doesn't exist. */ +#ifndef HAVE_MEMMOVE +#ifdef HAVE_BCOPY +#define memmove(d,s,l) bcopy((s),(d),(l)) +#else +#error memmove does not exist on this platform, nor is a substitute available +#endif /* HAVE_BCOPY */ +#endif /* HAVE_MEMMOVE */ + hunk ./hexpat.cabal 3 -Version: 0.19.2 +Version: 0.19.3 hunk ./hexpat.cabal 51 - on Linux, Mac and Windows (thanks Jacob Stanley) + on Linux, Mac and Windows (thanks Jacob Stanley); 0.19.3 fix misconfiguration of expat + which broke entity parsing. hunk ./hexpat.cabal 152 + cc-options: -DHAVE_MEMMOVE -DXML_NS -DXML_DTD + hunk ./test/hexpat-tests.cabal 41 + cc-options: -DHAVE_MEMMOVE -DXML_NS -DXML_DTD + hunk ./test/suite/Text/XML/Expat/UnitTests.hs 11 +import qualified Data.ByteString.Lazy.Char8 as LC hunk ./test/suite/Text/XML/Expat/UnitTests.hs 97 - assertEqual "error1" (Left $ XMLParseError "unclosed token" + assertEqual "error1" (Left $ XMLParseError "not well-formed (invalid token)" hunk ./test/suite/Text/XML/Expat/UnitTests.hs 124 -test_entities = do +test_entities1 = do hunk ./test/suite/Text/XML/Expat/UnitTests.hs 140 +test_entities2 = do + assertEqual "wrong answer" (Element "html" [] [Text "\228"], Nothing) pr + where + pr :: (UNode String, Maybe XMLParseError) + pr = Tree.parse opt $ LC.pack "ä" + where + opt = defaultParseOptions + { entityDecoder = Just ed } + ed "auml" = Just "\228" + ed _ = Nothing hunk ./test/suite/Text/XML/Expat/UnitTests.hs 279 - TestLabel "entities" $ TestCase $ test_entities, + TestLabel "entities1" $ TestCase $ test_entities1, + TestLabel "entities2" $ TestCase $ test_entities2,