On 04/10/02, "Sascha Schumann" <[EMAIL PROTECTED]> wrote:
>     1. Use fgetc in stream_gets for stdio stream ops
>     2. Add file descriptor-based stream ops

>     3. Redirect _php_stream_fopen_from_file/pipe to new stream
>     ops, if possible

So, if fileno() returns a valid fd, we will use only read(2)/write(2),
otherwise we will use fgetc()/fread()/fwrite().
The latter should be an extremely rare occurrence - should be for
fopencookied or gnu memory based IO streams.

> > The stdio buffering could be restored when the stream is cast
> > for use by third-party libraries.
> 
>     I'm not sure what you are referring to -- do these libraries
>     make use of "FILE *" directly?

Potentially, yes.  One of the features of streams is that it allows
an extension to access the underlying handle (fd, FILE * or whatever),
and (to a limited extent) is able to synthesize/emulate the handle.
The whole point is to allow the stream to be passed into libraries
such as PDF, GD and others where the API is designed for a particular
handle type.

--Wez.


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to