diff options
author | Andy Wingo <wingo@pobox.com> | 2021-01-12 12:17:55 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2021-01-12 12:17:55 +0100 |
commit | 1820ed512135ea61f4b453a8cc0dc75f1e91b463 (patch) | |
tree | eb668113fe3dc559843f54a31a886db0ab4939c6 | |
parent | 0f42fef11981f38578bbd629a294b2053d258db0 (diff) | |
download | guile-1820ed512135ea61f4b453a8cc0dc75f1e91b463.tar.gz |
Finish call-with-port cleanup
* module/rnrs/io/ports.scm (call-with-port): Remove local definition.
* module/system/repl/server.scm (system): Call-with-port is imported
via (ice-9 ports).
-rw-r--r-- | module/rnrs/io/ports.scm | 9 | ||||
-rw-r--r-- | module/system/repl/server.scm | 3 |
2 files changed, 1 insertions, 11 deletions
diff --git a/module/rnrs/io/ports.scm b/module/rnrs/io/ports.scm index c19aee9af..71d1b394d 100644 --- a/module/rnrs/io/ports.scm +++ b/module/rnrs/io/ports.scm @@ -331,15 +331,6 @@ read from/written to in @var{port}." (and (false-if-exception (set-port-position! port (port-position port))) #t)) -(define (call-with-port port proc) - "Call @var{proc}, passing it @var{port} and closing @var{port} upon exit of -@var{proc}. Return the return values of @var{proc}." - (call-with-values - (lambda () (proc port)) - (lambda vals - (close-port port) - (apply values vals)))) - (define* (call-with-bytevector-output-port proc #:optional (transcoder #f)) (receive (port extract) (open-bytevector-output-port transcoder) (call-with-port port proc) diff --git a/module/system/repl/server.scm b/module/system/repl/server.scm index 9bc11af5f..7a04affe9 100644 --- a/module/system/repl/server.scm +++ b/module/system/repl/server.scm @@ -1,6 +1,6 @@ ;;; Repl server -;; Copyright (C) 2003, 2010, 2011, 2014, 2016, 2019 Free Software Foundation, Inc. +;; Copyright (C) 2003,2010,2011,2014,2016,2019,2021 Free Software Foundation, Inc. ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public @@ -27,7 +27,6 @@ #:use-module (ice-9 iconv) #:use-module (rnrs bytevectors) #:use-module (ice-9 binary-ports) - #:use-module ((rnrs io ports) #:select (call-with-port)) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) ; cut #:export (make-tcp-server-socket |