~ chicken-core (master) bc87394b727afee5fe5fa76e29280d9a85fe1f5e


commit bc87394b727afee5fe5fa76e29280d9a85fe1f5e
Author:     felix <felix@call-with-current-continuation.org>
AuthorDate: Sat Sep 5 23:14:21 2026 +0200
Commit:     felix <felix@call-with-current-continuation.org>
CommitDate: Sat Sep 5 23:19:01 2026 +0200

    bogus

diff --git a/library.scm b/library.scm
index ea3f8b80..7b76159b 100644
--- a/library.scm
+++ b/library.scm
@@ -4086,9 +4086,6 @@ EOF
 ;   12: Static buffer for read-line, allocated on-demand
 
 (define ##sys#stream-port-class
-  (define (u8-ready? p)
-    (or (##sys#slot p 10)
-        (##core#inline "C_char_ready_p" p) ))
   (vector (lambda (p)      ; read-char
             (let loop ()
               (let ((peeked (##sys#slot p 10)))
@@ -4143,7 +4140,9 @@ EOF
             (##sys#update-errno) )
           (lambda (p)      ; flush-output
             (##core#inline "C_flush_output" p) )
-          u8-ready?
+          (lambda (p)      ; u8-ready?
+            (or (##sys#slot p 10)
+                (##core#inline "C_char_ready_p" p) ))
           (lambda (p n dest start)           ; read-bytevector!
             (let ((pb (##sys#slot p 10))
                   (nc 0))
@@ -4227,7 +4226,9 @@ EOF
                           (##sys#setislot p 4 (fx+ (##sys#slot p 4) 1))
                           (##sys#buffer->string/encoding buffer 0 n (##sys#slot p 15))))))))
           #f  ; read-buffered
-          u8-ready?       ; char-ready?
+          (lambda (p)      ; char-ready? (effectively u8-ready?)
+            (or (##sys#slot p 10)
+                (##core#inline "C_char_ready_p" p) ))
           ) )
 
 (define ##sys#open-file-port (##core#primitive "C_open_file_port"))
diff --git a/port.scm b/port.scm
index 329ea715..98177b61 100644
--- a/port.scm
+++ b/port.scm
@@ -412,7 +412,7 @@ char *ttyname(int fd) {
 	     read-line			; read-line
 	     read-buffered     ; read-buffered
              (lambda (p) (ready?))  ; char-ready?
-             )))
+             ))
 	   (data (vector #f))
 	   (port (##sys#make-port 1 class "(custom)" 'custom)))
       (##sys#setslot port 10 #f)
Trap