compat: Add 'call-with-input-string' for Mes.
* gash/compat.scm [mes] (call-with-input-string): New procedure.
This commit is contained in:
parent
efe0522d06
commit
d088464510
|
@ -100,6 +100,7 @@
|
|||
file-port?
|
||||
input-port?
|
||||
output-port?
|
||||
call-with-input-string
|
||||
thunk?)
|
||||
|
||||
(define-macro (define-inlinable . rest)
|
||||
|
@ -169,6 +170,13 @@
|
|||
(define (input-port? port) #f)
|
||||
(define (output-port? port) #f)
|
||||
|
||||
(define (call-with-input-string str proc)
|
||||
(let ((port (open-input-string str)))
|
||||
(call-with-values (lambda () (proc port))
|
||||
(lambda results
|
||||
(close-port port)
|
||||
(apply values results)))))
|
||||
|
||||
;; Fix 'dup' interface.
|
||||
(let ((mes/dup dup))
|
||||
(define* (guile/dup fd #:optional new)
|
||||
|
|
Loading…
Reference in New Issue