mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
Fix bug #52802 (Out-of-date comment for
file_get_contents/php_stream_copy_to_mem) by updating the relevant comments.
This commit is contained in:
parent
03df7fce82
commit
6e06a45f24
2 changed files with 4 additions and 5 deletions
|
@ -558,7 +558,6 @@ PHP_FUNCTION(file_get_contents)
|
||||||
RETURN_FALSE;
|
RETURN_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* uses mmap if possible */
|
|
||||||
if ((len = php_stream_copy_to_mem(stream, &contents, maxlen, 0)) > 0) {
|
if ((len = php_stream_copy_to_mem(stream, &contents, maxlen, 0)) > 0) {
|
||||||
|
|
||||||
if (PG(magic_quotes_runtime)) {
|
if (PG(magic_quotes_runtime)) {
|
||||||
|
|
|
@ -416,8 +416,8 @@ END_EXTERN_C()
|
||||||
#define PHP_STREAM_OPTION_RETURN_ERR -1 /* problem setting option */
|
#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 */
|
#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).
|
/* copy up to maxlen bytes from src to dest. If maxlen is PHP_STREAM_COPY_ALL,
|
||||||
* Uses mmap if the src is a plain file and at offset 0 */
|
* copy until eof(src). */
|
||||||
#define PHP_STREAM_COPY_ALL ((size_t)-1)
|
#define PHP_STREAM_COPY_ALL ((size_t)-1)
|
||||||
|
|
||||||
BEGIN_EXTERN_C()
|
BEGIN_EXTERN_C()
|
||||||
|
@ -428,8 +428,8 @@ PHPAPI size_t _php_stream_copy_to_stream_ex(php_stream *src, php_stream *dest, s
|
||||||
#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)
|
#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.
|
/* read all data from stream and put into a buffer. Caller must free buffer
|
||||||
* The copy will use mmap if available. */
|
* when done. */
|
||||||
PHPAPI size_t _php_stream_copy_to_mem(php_stream *src, char **buf, size_t maxlen,
|
PHPAPI size_t _php_stream_copy_to_mem(php_stream *src, char **buf, size_t maxlen,
|
||||||
int persistent STREAMS_DC TSRMLS_DC);
|
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)
|
#define php_stream_copy_to_mem(src, buf, maxlen, persistent) _php_stream_copy_to_mem((src), (buf), (maxlen), (persistent) STREAMS_CC TSRMLS_CC)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue