When doing port-type inheritance, don't inherit any standard
authorChris Hanson <org/chris-hanson/cph>
Tue, 16 Feb 1999 20:41:49 +0000 (20:41 +0000)
committerChris Hanson <org/chris-hanson/cph>
Tue, 16 Feb 1999 20:41:49 +0000 (20:41 +0000)
operations if one or more is given.

v7/src/runtime/port.scm

index c913da9d3275eace3073ea66e1622e8fcecf7417..7153281550791fcef924297ec975e99d4e87909b 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: port.scm,v 1.14 1999/02/16 19:43:17 cph Exp $
+$Id: port.scm,v 1.15 1999/02/16 20:41:49 cph Exp $
 
 Copyright (c) 1991-1999 Massachusetts Institute of Technology
 
@@ -328,8 +328,16 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
          (append operations
                  (if type
                      (list-transform-negative (port-type/operations type)
-                       (lambda (entry)
-                         (assq (car entry) operations)))
+                       (let ((ignored
+                              (append (if (assq 'READ-CHAR operations)
+                                          input-operation-names
+                                          '())
+                                      (if (assq 'WRITE-CHAR operations)
+                                          output-operation-names
+                                          '()))))
+                         (lambda (entry)
+                           (or (assq (car entry) operations)
+                               (memq (car entry) ignored)))))
                      '()))
          procedure-name)))
     (install-operations! type input?