chicken-janitors
[Top][All Lists]
Advanced

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

#1801: parley constructs an internally inconsistent input port


From: Chicken Trac
Subject: #1801: parley constructs an internally inconsistent input port
Date: Tue, 26 Apr 2022 09:50:50 -0000

#1801: parley constructs an internally inconsistent input port
----------------------------------------------+-------------------------
            Reporter:  Vasilij Schneidermann  |       Type:  defect
              Status:  new                    |   Priority:  minor
           Milestone:  someday                |  Component:  extensions
             Version:  5.3.0                  |   Keywords:  parley port
Estimated difficulty:  medium                 |
----------------------------------------------+-------------------------
 The parley egg still hasn't been ported successfully to C5. Most of the
 steps are done already (egg file, imports, tests), but interactive usage
 fails:

 {{{
 #;2> (define p (let ((old (current-input-port))) (make-parley-port old)))
 #;3> p
 #<port "(parley)">
 #;4> (input-port? (current-input-port))
 #t
 #;5> (input-port? p)
 #t
 #;6> (current-input-port p)

 Error: (current-input-port) bad argument type - not a port of the correct
 type: #<port "(parley)">

         Call history:

         <syntax>          (current-input-port p)
         <eval>    (current-input-port p)        <--
 }}}

 Looking at the code performing checks, it seems that the I/O direction
 slot is checked whether it's an input one. Both `input-port?` and
 `current-input-port` seem to look at the same slot, but arrive to
 different conclusions. Perhaps C5 changed some port internals?

 One way of side-stepping this would be to avoid low-level port
 construction, but this might break C4 compatibility completely.

-- 
Ticket URL: <https://bugs.call-cc.org/ticket/1801>
CHICKEN Scheme <https://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.

reply via email to

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