guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 03/05: Finish call-with-port cleanup


From: Andy Wingo
Subject: [Guile-commits] 03/05: Finish call-with-port cleanup
Date: Tue, 12 Jan 2021 06:26:36 -0500 (EST)

wingo pushed a commit to branch master
in repository guile.

commit 1820ed512135ea61f4b453a8cc0dc75f1e91b463
Author: Andy Wingo <wingo@pobox.com>
AuthorDate: Tue Jan 12 12:17:55 2021 +0100

    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).
---
 module/rnrs/io/ports.scm      | 9 ---------
 module/system/repl/server.scm | 3 +--
 2 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/module/rnrs/io/ports.scm b/module/rnrs/io/ports.scm
index c19aee9..71d1b39 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 9bc11af..7a04aff 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]