diff options
author | Leo Famulari <leo@famulari.name> | 2018-01-11 14:22:50 -0800 |
---|---|---|
committer | Leo Famulari <leo@famulari.name> | 2018-01-11 14:22:50 -0800 |
commit | 4adb40bffc0dda8871878283887a0e0cd88d9578 (patch) | |
tree | 74d5fb686116002da72de4a1075d0ed8f307cec1 /guix/serialization.scm | |
parent | 4610ab7c9a5327df0d475262817bc081a5891aa8 (diff) | |
parent | 138c08899ba73049de8afd2b74a8cf6845a1d9e1 (diff) | |
download | guix-patches-4adb40bffc0dda8871878283887a0e0cd88d9578.tar guix-patches-4adb40bffc0dda8871878283887a0e0cd88d9578.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/serialization.scm')
-rw-r--r-- | guix/serialization.scm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/guix/serialization.scm b/guix/serialization.scm index e6ae2fc307..b41a0a09d1 100644 --- a/guix/serialization.scm +++ b/guix/serialization.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -102,9 +102,9 @@ (or (zero? m) (put-bytevector p zero 0 (- 8 m))))))) -(define (write-bytevector s p) - (let* ((l (bytevector-length s)) - (m (modulo l 8)) +(define* (write-bytevector s p + #:optional (l (bytevector-length s))) + (let* ((m (modulo l 8)) (b (make-bytevector (+ 8 l (if (zero? m) 0 (- 8 m)))))) (bytevector-u32-set! b 0 l (endianness little)) (bytevector-copy! s 0 b 8 l) |