[commit: packages/binary] master: Simplify the skip, get*LazyByteString* functions. (6c9c47f)

git at git.haskell.org git at git.haskell.org
Mon Jun 1 08:47:43 UTC 2015


Repository : ssh://git@git.haskell.org/binary

On branch  : master
Link       : http://git.haskell.org/packages/binary.git/commitdiff/6c9c47f8db5d23360d1147288086e33f9d93350e

>---------------------------------------------------------------

commit 6c9c47f8db5d23360d1147288086e33f9d93350e
Author: Lennart Kolmodin <kolmodin at google.com>
Date:   Sat May 30 11:14:27 2015 +0200

    Simplify the skip, get*LazyByteString* functions.
    
    Affects;
     - skip
     - getLazyByteString
     - getLazyByteStringNul
     - getRemainingLazyByteString
    
    These functions all read input chunks until some condition,
    reading enough bytes, reaching a NUL character, or it has consumed all
    bytes. They're now implemented by withInputChunks.
    This fixes a bug where the position in the input previously wasn't
    correctly reported if you ran out of input bytes.
    
    Tests have been added for getLazyByteString and skip to Action.hs.
    Tests for getLazyByteStringNul and getRemainingLazyByteString already
    exist in QC.hs.


>---------------------------------------------------------------

6c9c47f8db5d23360d1147288086e33f9d93350e
 src/Data/Binary/Get.hs          | 64 ++++++++++++++++-------------------------
 src/Data/Binary/Get/Internal.hs | 36 ++++++++++++++---------
 tests/Action.hs                 | 26 ++++++++++++++++-
 3 files changed, 71 insertions(+), 55 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 6c9c47f8db5d23360d1147288086e33f9d93350e


More information about the ghc-commits mailing list