mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 15:36:20 -05:00
utils: Use an idiom compatible with both 2.0 and 2.2.
Fixes a regression introduced in7447aa36e1
. Reported by Ricardo Wurmus. * guix/utils.scm: Revert7447aa36e1
. Use #:prefix for (ice-9 iconv) to support both 2.0 and 2.2.
This commit is contained in:
parent
f2ac937924
commit
3104475148
1 changed files with 3 additions and 3 deletions
|
@ -31,7 +31,7 @@ (define-module (guix utils)
|
|||
#: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 @@ (define-module (guix utils)
|
|||
#: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 @@ (define* (edit-expression source-properties proc #:key (encoding "UTF-8"))
|
|||
(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))
|
||||
|
|
Loading…
Reference in a new issue