On 18/03/02, "Marcus Börger"  wrote:
> If have the following annotations to streams:
> 1) i do not like the style of how to determine the kine of a stream
> instead of
> #define php_stream_is(stream, anops)            ((stream)->ops == anops)
> #define PHP_STREAM_IS_STDIO &php_stream_stdio_ops
> 
> i would like a 'call form' like
> #define php_stream_is(stream, anops)            ((stream)->ops == anops)
> #define PHP_STREAM_IS_STDIO(stream) \
>      php_stream_is (stream,&php_stream_stdio_ops)

I do prefer the former (which is why I wrote it that way). I don't
think it makes much difference, because not much code should be calling
it anyway.

> 2) for seekable streams the copy function should seek to 0 if
> copying all, shouldn't it?

No: as an example consider some code that is performing an HTTP request.
It might want to store the headers in one stream and the body in another.
So, it would manually loop and store the headers line by line until
it hits the blank line separator and then use copy_to_stream to
stick the rest of the data in the other stream. 
 
> 3) the patch below shows that as expected only one line has to be
> modified in order to use temp-streams instead of temp-files directly.
> But you would have to reenable memory_streams.c. I tried it and it
> worked fine for me.

I want to do some tests before doing this; but there should be no
problems.

--Wez.


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

Reply via email to