aharvey                                  Fri, 10 Sep 2010 03:08:05 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=303249

Log:
Fix bug #52802 (Out-of-date comment for
file_get_contents/php_stream_copy_to_mem) by updating the relevant comments.

Bug: http://bugs.php.net/52802 (Assigned) Out-of-date comment for 
file_get_contents/php_stream_copy_to_mem
      
Changed paths:
    U   php/php-src/branches/PHP_5_3/ext/standard/file.c
    U   php/php-src/branches/PHP_5_3/main/php_streams.h
    U   php/php-src/trunk/ext/standard/file.c
    U   php/php-src/trunk/main/php_streams.h

Modified: php/php-src/branches/PHP_5_3/ext/standard/file.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/file.c    2010-09-10 02:53:06 UTC 
(rev 303248)
+++ php/php-src/branches/PHP_5_3/ext/standard/file.c    2010-09-10 03:08:05 UTC 
(rev 303249)
@@ -558,7 +558,6 @@
                RETURN_FALSE;
        }

-       /* uses mmap if possible */
        if ((len = php_stream_copy_to_mem(stream, &contents, maxlen, 0)) > 0) {

                if (PG(magic_quotes_runtime)) {

Modified: php/php-src/branches/PHP_5_3/main/php_streams.h
===================================================================
--- php/php-src/branches/PHP_5_3/main/php_streams.h     2010-09-10 02:53:06 UTC 
(rev 303248)
+++ php/php-src/branches/PHP_5_3/main/php_streams.h     2010-09-10 03:08:05 UTC 
(rev 303249)
@@ -416,8 +416,8 @@
 #define PHP_STREAM_OPTION_RETURN_ERR           -1 /* problem setting option */
 #define PHP_STREAM_OPTION_RETURN_NOTIMPL       -2 /* underlying stream does 
not implement; streams can handle it instead */

-/* 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 */
+/* copy up to maxlen bytes from src to dest.  If maxlen is PHP_STREAM_COPY_ALL,
+ * copy until eof(src). */
 #define PHP_STREAM_COPY_ALL            ((size_t)-1)

 BEGIN_EXTERN_C()
@@ -428,8 +428,8 @@
 #define php_stream_copy_to_stream_ex(src, dest, maxlen, len)   
_php_stream_copy_to_stream_ex((src), (dest), (maxlen), (len) STREAMS_CC 
TSRMLS_CC)


-/* read all data from stream and put into a buffer. Caller must free buffer 
when done.
- * The copy will use mmap if available. */
+/* read all data from stream and put into a buffer. Caller must free buffer
+ * when done. */
 PHPAPI size_t _php_stream_copy_to_mem(php_stream *src, char **buf, size_t 
maxlen,
                int persistent STREAMS_DC TSRMLS_DC);
 #define php_stream_copy_to_mem(src, buf, maxlen, persistent) 
_php_stream_copy_to_mem((src), (buf), (maxlen), (persistent) STREAMS_CC 
TSRMLS_CC)

Modified: php/php-src/trunk/ext/standard/file.c
===================================================================
--- php/php-src/trunk/ext/standard/file.c       2010-09-10 02:53:06 UTC (rev 
303248)
+++ php/php-src/trunk/ext/standard/file.c       2010-09-10 03:08:05 UTC (rev 
303249)
@@ -557,7 +557,6 @@
                RETURN_FALSE;
        }

-       /* uses mmap if possible */
        if ((len = php_stream_copy_to_mem(stream, &contents, maxlen, 0)) > 0) {

                if (PG(magic_quotes_runtime)) {

Modified: php/php-src/trunk/main/php_streams.h
===================================================================
--- php/php-src/trunk/main/php_streams.h        2010-09-10 02:53:06 UTC (rev 
303248)
+++ php/php-src/trunk/main/php_streams.h        2010-09-10 03:08:05 UTC (rev 
303249)
@@ -416,8 +416,8 @@
 #define PHP_STREAM_OPTION_RETURN_ERR           -1 /* problem setting option */
 #define PHP_STREAM_OPTION_RETURN_NOTIMPL       -2 /* underlying stream does 
not implement; streams can handle it instead */

-/* 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 */
+/* copy up to maxlen bytes from src to dest.  If maxlen is PHP_STREAM_COPY_ALL,
+ * copy until eof(src). */
 #define PHP_STREAM_COPY_ALL            ((size_t)-1)

 BEGIN_EXTERN_C()
@@ -428,8 +428,8 @@
 #define php_stream_copy_to_stream_ex(src, dest, maxlen, len)   
_php_stream_copy_to_stream_ex((src), (dest), (maxlen), (len) STREAMS_CC 
TSRMLS_CC)


-/* read all data from stream and put into a buffer. Caller must free buffer 
when done.
- * The copy will use mmap if available. */
+/* read all data from stream and put into a buffer. Caller must free buffer
+ * when done. */
 PHPAPI size_t _php_stream_copy_to_mem(php_stream *src, char **buf, size_t 
maxlen,
                int persistent STREAMS_DC TSRMLS_DC);
 #define php_stream_copy_to_mem(src, buf, maxlen, persistent) 
_php_stream_copy_to_mem((src), (buf), (maxlen), (persistent) STREAMS_CC 
TSRMLS_CC)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to