HsSyck 0.44 → 0.45
raw patch · 3 files changed
+39/−19 lines, 3 filesdep +sybdep ~basedep ~bytestringPVP ok
version bump matches the API change (PVP)
Dependencies added: syb
Dependency ranges changed: base, bytestring
API changes (from Hackage documentation)
Files
- Changes +10/−0
- Data/Yaml/Syck.hsc +4/−4
- HsSyck.cabal +25/−15
Changes view
@@ -1,3 +1,13 @@+[Changes for 0.45 - 2009-05-15]++* Require Cabal 1.2.3+ to work with GHC 6.10 and above.+* Change unsafe ByteString packing to safe packing to avoid memory corruption.+ Contributed by: Nicolas Pouillard++[Changes for 0.44 - 2008-06-21]++* Tested against GHC-6.8.3; added the Pugs category; no functional changes.+ [Changes for 0.43 - 2008-06-21] * Properly documented the language extensions we use in the .cabal file.
Data/Yaml/Syck.hsc view
@@ -25,7 +25,7 @@ import qualified Data.HashTable as Hash import qualified Data.ByteString.Char8 as Buf import Data.ByteString.Char8 (useAsCStringLen, useAsCString)-import Data.ByteString.Unsafe (unsafePackCString, unsafePackCStringLen)+import Data.ByteString (packCString, packCStringLen) type Buf = Buf.ByteString type YamlTag = Maybe Buf@@ -168,7 +168,7 @@ outputCallbackPS :: IORef [Buf] -> SyckEmitter -> CString -> CLong -> IO () outputCallbackPS out emitter buf len = do- str <- unsafePackCStringLen (buf, fromEnum len)+ str <- packCStringLen (buf, fromEnum len) str `seq` modifyIORef out (str:) outputCallback :: SyckEmitter -> CString -> CLong -> IO ()@@ -349,7 +349,7 @@ syckNodeTag syckNode = do tag <- #{peek SyckNode, type_id} syckNode if (tag == nullPtr) then (return Nothing) else do- p <- unsafePackCString tag+ p <- packCString tag return $! case Buf.elemIndex '/' p of Just n -> let { pre = Buf.take n p; post = Buf.drop (n+1) p } in Just $ Buf.concat [_tagLiteral, pre, _colonLiteral, post]@@ -386,7 +386,7 @@ parseNode SyckStr _ syckNode len nid = do tag <- syckNodeTag syckNode cstr <- syck_str_read syckNode- buf <- unsafePackCStringLen (cstr, fromEnum len)+ buf <- packCStringLen (cstr, fromEnum len) let node = nilNode{ n_elem = EStr buf, n_tag = tag, n_id = nid } if tag == Nothing && Buf.length buf == 1 && Buf.index buf 0 == '~' then do
HsSyck.cabal view
@@ -1,5 +1,6 @@ Name: HsSyck-Version: 0.44+Version: 0.45+Cabal-version: >= 1.2.3 Category: Text, Pugs Synopsis: Fast, lightweight YAML loader and dumper Description: This is a simple YAML ('Yet Another Markup Language') processor,@@ -15,22 +16,31 @@ License-File: LICENSE Author: Audrey Tang Maintainer: audreyt@audreyt.org-Copyright: Audrey Tang, Gaal Yahas, 2005, 2006, 2007, 2008--Exposed-modules: Data.Yaml.Syck+Copyright: Audrey Tang, Gaal Yahas, 2005, 2006, 2007, 2008, 2009 -Build-Depends: base, bytestring>=0.9.0.1 Build-Type: Simple-Tested-With: GHC==6.8.2, GHC==6.8.3+Tested-With: GHC==6.8.2, GHC==6.8.3, GHC==6.10.1, GHC==6.10.2+Data-Files: Changes+Extra-Source-Files: syck/syck.h syck/syck_st.h syck/gram.h syck/yamlbyte.h -extensions: ForeignFunctionInterface, MagicHash, RecursiveDo,- DeriveDataTypeable, TypeSynonymInstances, PatternGuards+Flag SybInBase+ Description: syb was split from base >= 4+ Default: False -ghc-options: -funbox-strict-fields+Library+ if flag(SybInBase)+ Build-Depends: base>=3 && <4, bytestring>=0.9.0.1+ else+ Build-Depends: base>=4, bytestring>=0.9.0.1, syb -data-files: Changes-c-sources: syck/bytecode.c syck/emitter.c syck/gram.c syck/handler.c- syck/implicit.c syck/node.c syck/syck.c syck/syck_st.c syck/token.c- syck/yaml2byte.c-extra-source-files: syck/syck.h syck/syck_st.h syck/gram.h syck/yamlbyte.h-include-dirs: syck+ exposed-modules: Data.Yaml.Syck++ extensions: ForeignFunctionInterface, MagicHash, RecursiveDo,+ DeriveDataTypeable, TypeSynonymInstances, PatternGuards++ ghc-options: -funbox-strict-fields++ c-sources: syck/bytecode.c syck/emitter.c syck/gram.c syck/handler.c+ syck/implicit.c syck/node.c syck/syck.c syck/syck_st.c+ syck/token.c syck/yaml2byte.c+ include-dirs: syck