diff options
author | Ludovic Courtès <ludo@gnu.org> | 2017-03-09 09:48:33 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2017-03-09 09:48:33 +0100 |
commit | 3104475148af4f355f9ed5728582e79fea8b2c96 (patch) | |
tree | 57d98de48273b7fd5d069d78486fdc1733fad15a | |
parent | f2ac9379249b394571691f26298e338cbda49582 (diff) |
utils: Use an idiom compatible with both 2.0 and 2.2.
Fixes a regression introduced in 7447aa36e16fb77f75df4d3369db9c942615632e.
Reported by Ricardo Wurmus.
* guix/utils.scm: Revert 7447aa36e16fb77f75df4d3369db9c942615632e. Use
#:prefix for (ice-9 iconv) to support both 2.0 and 2.2.
-rw-r--r-- | guix/utils.scm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/guix/utils.scm b/guix/utils.scm index 2d59cccf3c..b72e3f233f 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -31,7 +31,7 @@ #:use-module (srfi srfi-60) #:use-module (rnrs bytevectors) #:use-module (ice-9 binary-ports) - #:use-module ((rnrs io ports) #:hide (bytevector->string)) + #:autoload (rnrs io ports) (make-custom-binary-input-port) #:use-module ((rnrs bytevectors) #:select (bytevector-u8-set!)) #:use-module (guix memoization) #:use-module ((guix build utils) #:select (dump-port)) @@ -43,7 +43,7 @@ #:use-module (ice-9 regex) #:use-module (ice-9 match) #:use-module (ice-9 format) - #:use-module ((ice-9 iconv) #:select (bytevector->string)) + #:use-module ((ice-9 iconv) #:prefix iconv:) #:use-module (system foreign) #:re-export (memoize) ; for backwards compatibility #:export (bytevector->base16-string @@ -326,7 +326,7 @@ This procedure returns #t on success." (seek in 0 SEEK_SET) ; read from the beginning of the file. (let* ((pre-bv (get-bytevector-n in start)) ;; The expression in string form. - (str (bytevector->string + (str (iconv:bytevector->string (get-bytevector-n in (- end start)) (port-encoding in))) (post-bv (get-bytevector-all in)) |