summaryrefslogtreecommitdiff
path: root/main/php_streams.h
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2002-03-16 02:48:35 +0000
committerWez Furlong <wez@php.net>2002-03-16 02:48:35 +0000
commit636829345ea4ce06766b55b43adfd2b47628fada (patch)
treeb492c19733f5331e0b56f2c0fb6793af26716514 /main/php_streams.h
parent94b6c6e87fe11ba9e4e0b28dc9eb42f775a32820 (diff)
downloadphp-git-636829345ea4ce06766b55b43adfd2b47628fada.tar.gz
Allow php_stream_copy_to_stream to do nothing when used with code
that calculates a max length of zero. (Thanks again Marcus).
Diffstat (limited to 'main/php_streams.h')
-rwxr-xr-xmain/php_streams.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/main/php_streams.h b/main/php_streams.h
index aae253a29f..2b4c0162bc 100755
--- a/main/php_streams.h
+++ b/main/php_streams.h
@@ -88,8 +88,9 @@ PHPAPI int php_stream_flush(php_stream *stream);
PHPAPI char *php_stream_gets(php_stream *stream, char *buf, size_t maxlen);
PHPAPI int php_stream_puts(php_stream *stream, char *buf);
-/* copy up to maxlen bytes from src to dest. If maxlen is 0, copy until eof(src).
+/* copy up to maxlen bytes from src to dest. If maxlen is PHP_STREAM_COPY_ALL, copy until eof(src).
* 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.