guile-devel
[Top][All Lists]
Advanced

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

Re: Making new ports.


From: Gary Houston
Subject: Re: Making new ports.
Date: 10 Oct 2000 06:59:39 -0000

> From: "Dale P. Smith" <address@hidden>
> Date: Mon, 9 Oct 2000 19:19:40 -0400
> 
> Yeah, (fileno p) won't work.  But other port types don't work either:
> 
> guile> (call-with-output-string (lambda (p) (fileno p)))
> 
> Backtrace:
> 0* [call-with-output-string #<procedure (p)>]
> 1* [#<procedure (p)> #<output: string 80c6528>]
> 2* [fileno #<output: string 80c6528>]
> 
> ERROR: In procedure fileno in expression (fileno p):
> ERROR: Wrong type argument in position 1 (expecting OPFPORTP): #<output:
> string 80c6528>
> ABORT: (wrong-type-arg)
> 
> The same is true for void ports.

Well no, but these type of ports don't have file descriptors.  fileno
definitely should not work.

> There should be some kind of interface for adding/managing buffers.  I
> didn't think the apache port needed it because the ap_rwrite call and
> friends are doing their own buffering, counting bytes and sending things
> out in chunks (or something like that).  How often is there a need for a
> new port type?  File/socket/string ports are probably all most people
> need.  In fact, I was initially using with-output-to-string and then
> sending the string with ap_rwrite.

It's probably not the highest priority, more like some day it'd be
nice to clean it up.  There are some other things that could be fixed,
like the replacing the string specs ("r+0" etc.) for creating file
ports and allowing different buffer sizes for input and output on
bidirectional ports.



reply via email to

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