Re: cvs: php4 /main php_streams.h streams.c
| From: | Derick Rethans | Date: | Sat, 16 Mar 2002 11:23:41 +0000 |
| Subject: | Re: cvs: php4 /main php_streams.h streams.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-10221@lists.php.net to get a copy of this message | ||
On Sat, 16 Mar 2002, Wez Furlong wrote:
> wez Fri Mar 15 22:50:17 2002 EDT
>
> Modified files:
> /php4/main php_streams.h streams.c
> Log:
> some minor docu-in-header changes
Do you plan to update the manual too?
Derick
>
> Index: php4/main/php_streams.h
> diff -u php4/main/php_streams.h:1.10 php4/main/php_streams.h:1.11
> --- php4/main/php_streams.h:1.10 Fri Mar 15 21:48:35 2002
> +++ php4/main/php_streams.h Fri Mar 15 22:50:17 2002
> @@ -25,6 +25,18 @@
>
> /* See README.STREAMS in php4 root dir for more info about this stuff */
>
> +/* The contents of the php_stream_ops and php_stream should only be accessed
> + * using the functions/macros in this header.
> + * If you need to get at something that doesn't have an API,
> + * drop me a line <wez@thebrainroom.com> and we can sort out a way to do
> + * it properly.
> + *
> + * The only exceptions to this rule are that stream implementations can use
> + * the php_stream->abstract pointer to hold their context, and streams
> + * opened via stream_open_wrappers can use the zval ptr in
> + * php_stream->wrapperdata to hold meta data for php scripts to
> + * retrieve using fgetwrapperdata(). */
> +
> typedef struct _php_stream php_stream;
>
> typedef struct _php_stream_ops {
> @@ -64,6 +76,7 @@
> int fclose_stdiocast;
> FILE *stdiocast; /* cache this, otherwise we might leak! */
> }; /* php_stream */
> +/* state definitions when closing down; these are private to streams.c */
> #define PHP_STREAM_FCLOSE_NONE 0
> #define PHP_STREAM_FCLOSE_FDOPEN 1
> #define PHP_STREAM_FCLOSE_FOPENCOOKIE 2
> @@ -92,8 +105,7 @@
> * Uses mmap if the src is a plain file and at offset 0 */
> #define PHP_STREAM_COPY_ALL -1
> PHPAPI size_t php_stream_copy_to_stream(php_stream *src, php_stream *dest, size_t maxlen);
> -/* read all data from stream and put into a buffer. Caller must free buffer when done,
> - * according to allocopts.
> +/* read all data from stream and put into a buffer. Caller must free buffer when done.
> * The copy will use mmap if available. */
> PHPAPI size_t php_stream_read_all(php_stream *src, char **buf, int persistent);
>
> Index: php4/main/streams.c
> diff -u php4/main/streams.c:1.16 php4/main/streams.c:1.17
> --- php4/main/streams.c:1.16 Fri Mar 15 22:33:48 2002
> +++ php4/main/streams.c Fri Mar 15 22:50:17 2002
> @@ -34,6 +34,7 @@
> #define MAP_FAILED ((void *) -1)
> #endif
>
> +#define CHUNK_SIZE 8192
>
> #ifdef PHP_WIN32
> #define EWOULDBLOCK WSAEWOULDBLOCK
> @@ -226,8 +227,6 @@
> zend_error(E_WARNING, "streams of type %s do not support seeking",
> stream->ops->label);
> return -1;
> }
> -
> -#define CHUNK_SIZE 8192
>
> PHPAPI size_t php_stream_read_all(php_stream *src, char **buf, int persistent)
> {
>
>
>
> --
> PHP CVS Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
Derick Rethans
---------------------------------------------------------------------
PHP: Scripting the Web - www.php.net - derick@php.net
All your branches are belong to me!
SRM: Site Resource Manager - www.vl-srm.net
---------------------------------------------------------------------