[skip ci] Fix various typos and grammar issues (#11143)

This commit is contained in:
Javier Eguiluz 2023-04-28 11:05:32 +02:00 committed by GitHub
parent 294d3e9eb5
commit 732d92c0e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
46 changed files with 64 additions and 64 deletions

View file

@ -354,7 +354,7 @@ PHP_FUNCTION(juliantojd)
/* {{{ heb_number_to_chars*/ /* {{{ heb_number_to_chars*/
/* /*
caution: the Hebrew format produces non unique result. caution: the Hebrew format produces non-unique result.
for example both: year '5' and year '5000' produce 'ה'. for example both: year '5' and year '5000' produce 'ה'.
use the numeric one for calculations. use the numeric one for calculations.
*/ */

View file

@ -152,7 +152,7 @@ void gdImageBmpCtx(gdImagePtr im, gdIOCtxPtr out, int compression)
gdBMPPutInt(out, im->colorsTotal); /* colours used */ gdBMPPutInt(out, im->colorsTotal); /* colours used */
gdBMPPutInt(out, 0); /* important colours */ gdBMPPutInt(out, 0); /* important colours */
/* The line must be divisible by 4, else its padded with NULLs */ /* The line must be divisible by 4, else it's padded with NULLs */
padding = ((int)(im->trueColor ? 3 : 1) * im->sx) % 4; padding = ((int)(im->trueColor ? 3 : 1) * im->sx) % 4;
if (padding) { if (padding) {
padding = 4 - padding; padding = 4 - padding;
@ -646,7 +646,7 @@ static int bmp_read_os2_v2_info(gdIOCtxPtr infile, bmp_info_t *info)
return 1; return 1;
} }
/* Lets seek the next 24 pointless bytes, we don't care too much about it */ /* Let's seek the next 24 pointless bytes, we don't care too much about it */
if (!gdGetBuf(useless_bytes, 24, infile)) { if (!gdGetBuf(useless_bytes, 24, infile)) {
return 1; return 1;
} }
@ -716,7 +716,7 @@ static int bmp_read_direct(gdImagePtr im, gdIOCtxPtr infile, bmp_info_t *info, b
} }
} }
/* The line must be divisible by 4, else its padded with NULLs */ /* The line must be divisible by 4, else it's padded with NULLs */
padding = ((int)(info->depth / 8) * info->width) % 4; padding = ((int)(info->depth / 8) * info->width) % 4;
if (padding) { if (padding) {
padding = 4 - padding; padding = 4 - padding;
@ -883,7 +883,7 @@ static int bmp_read_4bit(gdImagePtr im, gdIOCtxPtr infile, bmp_info_t *info, bmp
} }
} }
/* The line must be divisible by 4, else its padded with NULLs */ /* The line must be divisible by 4, else it's padded with NULLs */
padding = ((int)ceil(0.5 * info->width)) % 4; padding = ((int)ceil(0.5 * info->width)) % 4;
if (padding) { if (padding) {
padding = 4 - padding; padding = 4 - padding;
@ -970,7 +970,7 @@ static int bmp_read_8bit(gdImagePtr im, gdIOCtxPtr infile, bmp_info_t *info, bmp
} }
} }
/* The line must be divisible by 4, else its padded with NULLs */ /* The line must be divisible by 4, else it's padded with NULLs */
padding = (1 * info->width) % 4; padding = (1 * info->width) % 4;
if (padding) { if (padding) {
padding = 4 - padding; padding = 4 - padding;

View file

@ -161,7 +161,7 @@ PHP_HASH_API void PHP_FNV164Final(unsigned char digest[8], PHP_FNV164_CTX * cont
* alternate - if > 0 use the alternate version * alternate - if > 0 use the alternate version
* *
* returns: * returns:
* 32 bit hash as a static hash type * 32-bit hash as a static hash type
*/ */
static uint32_t static uint32_t
fnv_32_buf(void *buf, size_t len, uint32_t hval, int alternate) fnv_32_buf(void *buf, size_t len, uint32_t hval, int alternate)
@ -204,7 +204,7 @@ fnv_32_buf(void *buf, size_t len, uint32_t hval, int alternate)
* alternate - if > 0 use the alternate version * alternate - if > 0 use the alternate version
* *
* returns: * returns:
* 64 bit hash as a static hash type * 64-bit hash as a static hash type
*/ */
static uint64_t static uint64_t
fnv_64_buf(void *buf, size_t len, uint64_t hval, int alternate) fnv_64_buf(void *buf, size_t len, uint64_t hval, int alternate)

View file

@ -238,7 +238,7 @@ PHP_HASH_API void PHP_MD4Update(PHP_MD4_CTX * context, const unsigned char *inpu
/* }}} */ /* }}} */
/* {{{ PHP_MD4Final /* {{{ PHP_MD4Final
MD4 finalization. Ends an MD4 message-digest operation, writing the MD4 finalization. Ends an MD4 message-digest operation, writing
the message digest and zeroizing the context. the message digest and zeroizing the context.
*/ */
PHP_HASH_API void PHP_MD4Final(unsigned char digest[16], PHP_MD4_CTX * context) PHP_HASH_API void PHP_MD4Final(unsigned char digest[16], PHP_MD4_CTX * context)

View file

@ -370,7 +370,7 @@ zval* collator_normalize_sort_argument( zval* arg, zval *rv )
if( Z_TYPE_P( arg ) != IS_STRING ) if( Z_TYPE_P( arg ) != IS_STRING )
{ {
/* If its not a string then nothing to do. /* If it's not a string then nothing to do.
* Return original arg. * Return original arg.
*/ */
COLLATOR_CONVERT_RETURN_FAILED( arg ); COLLATOR_CONVERT_RETURN_FAILED( arg );

View file

@ -22,7 +22,7 @@
* *
*/ */
/* /*
* The source code included in this files was separated from mbfilter.c * The source code included in this file was separated from mbfilter.c
* by Moriyoshi Koizumi <moriyoshi@php.net> on 4 Dec 2002. The file * by Moriyoshi Koizumi <moriyoshi@php.net> on 4 Dec 2002. The file
* mbfilter.c is included in this package . * mbfilter.c is included in this package .
* *

View file

@ -22,7 +22,7 @@
* *
*/ */
/* /*
* The source code included in this files was separated from mbfilter_tw.c * The source code included in this file was separated from mbfilter_tw.c
* by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002.
* *
*/ */

View file

@ -22,7 +22,7 @@
* *
*/ */
/* /*
* the source code included in this files was separated from mbfilter_cn.c * the source code included in this file was separated from mbfilter_cn.c
* by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002.
* *
*/ */

View file

@ -22,7 +22,7 @@
* *
*/ */
/* /*
* The source code included in this files was separated from mbfilter_cn.c * The source code included in this file was separated from mbfilter_cn.c
* by Moriyoshi Koizumi <moriyoshi@php.net> on 4 Dec 2002. * by Moriyoshi Koizumi <moriyoshi@php.net> on 4 Dec 2002.
* *
*/ */

View file

@ -22,7 +22,7 @@
* *
*/ */
/* /*
* The source code included in this files was separated from mbfilter_ja.c * The source code included in this file was separated from mbfilter_ja.c
* by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002.
* *
*/ */

View file

@ -22,7 +22,7 @@
* *
*/ */
/* /*
* The source code included in this files was separated from mbfilter_ja.c * The source code included in this file was separated from mbfilter_ja.c
* by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002.
* *
*/ */

View file

@ -22,7 +22,7 @@
* *
*/ */
/* /*
* the source code included in this files was separated from mbfilter_cp936.c * the source code included in this file was separated from mbfilter_cp936.c
* by rui hirokawa <hirokawa@php.net> on 11 Aug 2011. * by rui hirokawa <hirokawa@php.net> on 11 Aug 2011.
* *
*/ */

View file

@ -22,7 +22,7 @@
* *
*/ */
/* /*
* The source code included in this files was separated from mbfilter_iso2022_jp_ms.c * The source code included in this file was separated from mbfilter_iso2022_jp_ms.c
* by Rui Hirokawa <hirokawa@php.net> on 25 July 2011. * by Rui Hirokawa <hirokawa@php.net> on 25 July 2011.
* *
*/ */

View file

@ -22,7 +22,7 @@
* *
*/ */
/* /*
* The source code included in this files was separated from mbfilter.c * The source code included in this file was separated from mbfilter.c
* by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002.
* *
*/ */

View file

@ -22,7 +22,7 @@
* *
*/ */
/* /*
* The source code included in this files was separated from mbfilter_ja.c * The source code included in this file was separated from mbfilter_ja.c
* by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002.
* *
*/ */

View file

@ -22,7 +22,7 @@
* *
*/ */
/* /*
* The source code included in this files was separated from mbfilter.c * The source code included in this file was separated from mbfilter.c
* by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002.
* *
*/ */

View file

@ -22,7 +22,7 @@
* *
*/ */
/* /*
* The source code included in this files was separated from mbfilter.c * The source code included in this file was separated from mbfilter.c
* by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002.
* *
*/ */

View file

@ -22,7 +22,7 @@
* *
*/ */
/* /*
* The source code included in this files was separated from mbfilter.c * The source code included in this file was separated from mbfilter.c
* by moriyoshi koizumi <moriyoshi@php.net> on 20 dec 2002. * by moriyoshi koizumi <moriyoshi@php.net> on 20 dec 2002.
* *
*/ */

View file

@ -22,7 +22,7 @@
* *
*/ */
/* /*
* The source code included in this files was separated from mbfilter.c * The source code included in this file was separated from mbfilter.c
* by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002.
* *
*/ */

View file

@ -22,7 +22,7 @@
* *
*/ */
/* /*
* The source code included in this files was separated from mbfilter.c * The source code included in this file was separated from mbfilter.c
* by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002.
* *
*/ */

View file

@ -22,7 +22,7 @@
* *
*/ */
/* /*
* The source code included in this files was separated from mbfilter.c * The source code included in this file was separated from mbfilter.c
* by rui hrokawa <hirokawa@php.net> on 8 aug 2011. * by rui hrokawa <hirokawa@php.net> on 8 aug 2011.
* *
*/ */

View file

@ -22,7 +22,7 @@
* *
*/ */
/* /*
* The source code included in this files was separated from mbfilter.c * The source code included in this file was separated from mbfilter.c
* by Moriyoshi Koizumi <moriyoshi@php.net> on 20 Dec 2002. The file * by Moriyoshi Koizumi <moriyoshi@php.net> on 20 Dec 2002. The file
* mbfilter.c is included in this package . * mbfilter.c is included in this package .
* *

View file

@ -22,7 +22,7 @@
* *
*/ */
/* /*
* The source code included in this files was separated from mbfilter.c * The source code included in this file was separated from mbfilter.c
* by Moriyoshi Koizumi <moriyoshi@php.net> on 20 Dec 2002. The file * by Moriyoshi Koizumi <moriyoshi@php.net> on 20 Dec 2002. The file
* mbfilter.c is included in this package . * mbfilter.c is included in this package .
* *

View file

@ -22,7 +22,7 @@
* *
*/ */
/* /*
* The source code included in this files was separated from mbfilter.c * The source code included in this file was separated from mbfilter.c
* by Moriyoshi Koizumi <moriyoshi@php.net> on 20 Dec 2002. The file * by Moriyoshi Koizumi <moriyoshi@php.net> on 20 Dec 2002. The file
* mbfilter.c is included in this package . * mbfilter.c is included in this package .
* *

View file

@ -22,7 +22,7 @@
* *
*/ */
/* /*
* The source code included in this files was separated from mbfilter.c * The source code included in this file was separated from mbfilter.c
* by Moriyoshi Koizumi <moriyoshi@php.net> on 20 Dec 2002. The file * by Moriyoshi Koizumi <moriyoshi@php.net> on 20 Dec 2002. The file
* mbfilter.c is included in this package . * mbfilter.c is included in this package .
* *

View file

@ -1348,7 +1348,7 @@ PHP_FUNCTION(mb_http_output)
} }
/* }}} */ /* }}} */
/* {{{ Sets the current detect_order or Return the current detect_order as a array */ /* {{{ Sets the current detect_order or Return the current detect_order as an array */
PHP_FUNCTION(mb_detect_order) PHP_FUNCTION(mb_detect_order)
{ {
zend_string *order_str = NULL; zend_string *order_str = NULL;
@ -4828,7 +4828,7 @@ finish_up_remaining_bytes:
switch (ab) { switch (ab) {
case 1: case 1:
/* 2-byte character. No further bytes to check for 0x80. Check first byte /* 2-byte character. No further bytes to check for 0x80. Check first byte
* for for xx00 000x (overlong sequence). */ * for xx00 000x (overlong sequence). */
if ((c & 0x3e) == 0) { if ((c & 0x3e) == 0) {
return false; return false;
} }
@ -4844,7 +4844,7 @@ finish_up_remaining_bytes:
case 3: case 3:
/* 4-byte character. Check 3rd and 4th bytes for 0x80. Then check first 2 /* 4-byte character. Check 3rd and 4th bytes for 0x80. Then check first 2
* bytes for for 1111 0000, xx00 xxxx (overlong sequence), then check for a * bytes for 1111 0000, xx00 xxxx (overlong sequence), then check for a
* character greater than 0x0010ffff (f4 8f bf bf) */ * character greater than 0x0010ffff (f4 8f bf bf) */
if ((*(++p) & 0xc0) != 0x80 || (*(++p) & 0xc0) != 0x80 || (c == 0xf0 && (d & 0x30) == 0) || (c > 0xf4 || (c == 0xf4 && d > 0x8f))) { if ((*(++p) & 0xc0) != 0x80 || (*(++p) & 0xc0) != 0x80 || (c == 0xf0 && (d & 0x30) == 0) || (c > 0xf4 || (c == 0xf4 && d > 0x8f))) {
return false; return false;

View file

@ -691,7 +691,7 @@ mysqlnd_stmt_execute_calculate_param_values_size(MYSQLND_STMT_DATA * stmt, zval
/* /*
User hasn't sent anything, we will send empty string. User hasn't sent anything, we will send empty string.
Empty string has length of 0, encoded in 1 byte. No real Empty string has length of 0, encoded in 1 byte. No real
data will follows after it. data will follow after it.
*/ */
(*data_size)++; (*data_size)++;
} }

View file

@ -328,7 +328,7 @@ mysqlnd_query_read_result_set_header(MYSQLND_CONN_DATA * conn, MYSQLND_STMT * s)
/* /*
If SERVER_MORE_RESULTS_EXISTS is set then this is either MULTI_QUERY or a CALL() If SERVER_MORE_RESULTS_EXISTS is set then this is either MULTI_QUERY or a CALL()
The first packet after sending the query/com_execute has the bit set only The first packet after sending the query/com_execute has the bit set only
in this cases. Not sure why it's a needed but it marks that the whole stream in these cases. Not sure why it's a needed but it marks that the whole stream
will include many result sets. What actually matters are the bits set at the end will include many result sets. What actually matters are the bits set at the end
of every result set (the EOF packet). of every result set (the EOF packet).
*/ */

View file

@ -1636,7 +1636,7 @@ zend_result php_openssl_setup_crypto(php_stream *stream,
ERR_clear_error(); ERR_clear_error();
/* We need to do slightly different things based on client/server method /* We need to do slightly different things based on client/server method
* so lets remember which method was selected */ * so let's remember which method was selected */
sslsock->is_client = cparam->inputs.method & STREAM_CRYPTO_IS_CLIENT; sslsock->is_client = cparam->inputs.method & STREAM_CRYPTO_IS_CLIENT;
method_flags = cparam->inputs.method & ~STREAM_CRYPTO_IS_CLIENT; method_flags = cparam->inputs.method & ~STREAM_CRYPTO_IS_CLIENT;

View file

@ -41,7 +41,7 @@ static char *pdo_dblib_get_field_name(int type)
* (example: varchar is reported as char by dbprtype) * (example: varchar is reported as char by dbprtype)
* *
* FIX ME: Cache datatypes from server systypes table in pdo_dblib_handle_factory() * FIX ME: Cache datatypes from server systypes table in pdo_dblib_handle_factory()
* to make this future proof. * to make this future-proof.
*/ */
switch (type) { switch (type) {

View file

@ -2297,7 +2297,7 @@ PHP_FUNCTION(socket_export_stream)
getsockopt(socket->bsd_socket, SOL_SOCKET, SO_TYPE, (char *) &protoid, &protoidlen); getsockopt(socket->bsd_socket, SOL_SOCKET, SO_TYPE, (char *) &protoid, &protoidlen);
if (protoid == SOCK_STREAM) { if (protoid == SOCK_STREAM) {
/* SO_PROTOCOL is not (yet?) supported on OS X, so lets assume it's TCP there */ /* SO_PROTOCOL is not (yet?) supported on OS X, so let's assume it's TCP there */
#ifdef SO_PROTOCOL #ifdef SO_PROTOCOL
protoidlen = sizeof(protoid); protoidlen = sizeof(protoid);
getsockopt(socket->bsd_socket, SOL_SOCKET, SO_PROTOCOL, (char *) &protoid, &protoidlen); getsockopt(socket->bsd_socket, SOL_SOCKET, SO_PROTOCOL, (char *) &protoid, &protoidlen);

View file

@ -939,7 +939,7 @@ static php_conv_err_t php_conv_qprint_decode_convert(php_conv_qprint_decode *ins
ps++, icnt--; ps++, icnt--;
break; break;
} else if (!inst->lbchars && lb_cnt == 0 && *ps == '\n') { } else if (!inst->lbchars && lb_cnt == 0 && *ps == '\n') {
/* auto-detect line endings, looks like unix-lineendings, not to spec, but it is seem in the wild, a lot */ /* auto-detect line endings, looks like unix-lineendings, not to spec, but it is seen in the wild, a lot */
lb_cnt = lb_ptr = 0; lb_cnt = lb_ptr = 0;
scan_stat = 0; scan_stat = 0;
ps++, icnt--; ps++, icnt--;

View file

@ -712,9 +712,9 @@ static inline int process_named_entity_html(const char **buf, const char **start
*start = *buf; *start = *buf;
/* "&" is represented by a 0x26 in all supported encodings. That means /* "&" is represented by a 0x26 in all supported encodings. That means
* the byte after represents a character or is the leading byte of an * the byte after represents a character or is the leading byte of a
* sequence of 8-bit code units. If in the ranges below, it represents * sequence of 8-bit code units. If in the ranges below, it represents
* necessarily a alpha character because none of the supported encodings * necessarily an alpha character because none of the supported encodings
* has an overlap with ASCII in the leading byte (only on the second one) */ * has an overlap with ASCII in the leading byte (only on the second one) */
while ((**buf >= 'a' && **buf <= 'z') || while ((**buf >= 'a' && **buf <= 'z') ||
(**buf >= 'A' && **buf <= 'Z') || (**buf >= 'A' && **buf <= 'Z') ||

View file

@ -567,7 +567,7 @@ finish:
* interprets the RFC literally and establishes a keep-alive connection, * interprets the RFC literally and establishes a keep-alive connection,
* unless the user specifically requests something else by specifying a * unless the user specifically requests something else by specifying a
* Connection header in the context options. Send that header even for * Connection header in the context options. Send that header even for
* HTTP/1.0 to avoid issues when the server respond with a HTTP/1.1 * HTTP/1.0 to avoid issues when the server respond with an HTTP/1.1
* keep-alive response, which is the preferred response type. */ * keep-alive response, which is the preferred response type. */
if ((have_header & HTTP_HEADER_CONNECTION) == 0) { if ((have_header & HTTP_HEADER_CONNECTION) == 0) {
smart_str_appends(&req_buf, "Connection: close\r\n"); smart_str_appends(&req_buf, "Connection: close\r\n");

View file

@ -806,7 +806,7 @@ PHPAPI char *expand_filepath_with_mode(const char *filepath, char *real_path, co
fdtest = VCWD_OPEN(filepath, O_RDONLY); fdtest = VCWD_OPEN(filepath, O_RDONLY);
if (fdtest != -1) { if (fdtest != -1) {
/* return a relative file path if for any reason /* return a relative file path if for any reason
* we cannot cannot getcwd() and the requested, * we cannot getcwd() and the requested,
* relatively referenced file is accessible */ * relatively referenced file is accessible */
copy_len = path_len > MAXPATHLEN - 1 ? MAXPATHLEN - 1 : path_len; copy_len = path_len > MAXPATHLEN - 1 ? MAXPATHLEN - 1 : path_len;
if (real_path) { if (real_path) {

View file

@ -407,7 +407,7 @@ static PHP_INI_MH(OnUpdateTimeout)
/* /*
* If we're restoring INI values, we shouldn't reset the timer. * If we're restoring INI values, we shouldn't reset the timer.
* Otherwise, the timer is active when PHP is idle, such as the * Otherwise, the timer is active when PHP is idle, such as the
* the CLI web server or CGI. Running a script will re-activate * CLI web server or CGI. Running a script will re-activate
* the timeout, so it's not needed to do so at script end. * the timeout, so it's not needed to do so at script end.
*/ */
zend_set_timeout(EG(timeout_seconds), 0); zend_set_timeout(EG(timeout_seconds), 0);
@ -1022,7 +1022,7 @@ PHPAPI ZEND_COLD void php_verror(const char *docref, const char *params, int typ
origin = ZSTR_VAL(replace_origin); origin = ZSTR_VAL(replace_origin);
} }
/* origin and buffer available, so lets come up with the error message */ /* origin and buffer available, so let's come up with the error message */
if (docref && docref[0] == '#') { if (docref && docref[0] == '#') {
docref_target = strchr(docref, '#'); docref_target = strchr(docref, '#');
docref = NULL; docref = NULL;

View file

@ -969,7 +969,7 @@ connected:
/* }}} */ /* }}} */
/* {{{ php_any_addr /* {{{ php_any_addr
* Fills the any (wildcard) address into php_sockaddr_storage * Fills any (wildcard) address into php_sockaddr_storage
*/ */
PHPAPI void php_any_addr(int family, php_sockaddr_storage *addr, unsigned short port) PHPAPI void php_any_addr(int family, php_sockaddr_storage *addr, unsigned short port)
{ {

View file

@ -348,7 +348,7 @@ PHPAPI void php_output_discard_all(void)
/* }}} */ /* }}} */
/* {{{ int php_output_get_level(void) /* {{{ int php_output_get_level(void)
* Get output buffering level, ie. how many output handlers the stack contains */ * Get output buffering level, i.e. how many output handlers the stack contains */
PHPAPI int php_output_get_level(void) PHPAPI int php_output_get_level(void)
{ {
return OG(active) ? zend_stack_count(&OG(handlers)) : 0; return OG(active) ? zend_stack_count(&OG(handlers)) : 0;

View file

@ -199,7 +199,7 @@ struct _php_stream {
php_stream_filter_chain readfilters, writefilters; php_stream_filter_chain readfilters, writefilters;
php_stream_wrapper *wrapper; /* which wrapper was used to open the stream */ php_stream_wrapper *wrapper; /* which wrapper was used to open the stream */
void *wrapperthis; /* convenience pointer for a instance of a wrapper */ void *wrapperthis; /* convenience pointer for an instance of a wrapper */
zval wrapperdata; /* fgetwrapperdata retrieves this */ zval wrapperdata; /* fgetwrapperdata retrieves this */
uint8_t is_persistent:1; uint8_t is_persistent:1;
@ -290,7 +290,7 @@ PHPAPI int php_stream_from_persistent_id(const char *persistent_id, php_stream *
#define PHP_STREAM_FREE_CALL_DTOR 1 /* call ops->close */ #define PHP_STREAM_FREE_CALL_DTOR 1 /* call ops->close */
#define PHP_STREAM_FREE_RELEASE_STREAM 2 /* pefree(stream) */ #define PHP_STREAM_FREE_RELEASE_STREAM 2 /* pefree(stream) */
#define PHP_STREAM_FREE_PRESERVE_HANDLE 4 /* tell ops->close to not close it's underlying handle */ #define PHP_STREAM_FREE_PRESERVE_HANDLE 4 /* tell ops->close to not close its underlying handle */
#define PHP_STREAM_FREE_RSRC_DTOR 8 /* called from the resource list dtor */ #define PHP_STREAM_FREE_RSRC_DTOR 8 /* called from the resource list dtor */
#define PHP_STREAM_FREE_PERSISTENT 16 /* manually freeing a persistent connection */ #define PHP_STREAM_FREE_PERSISTENT 16 /* manually freeing a persistent connection */
#define PHP_STREAM_FREE_IGNORE_ENCLOSING 32 /* don't close the enclosing stream instead */ #define PHP_STREAM_FREE_IGNORE_ENCLOSING 32 /* don't close the enclosing stream instead */

View file

@ -207,7 +207,7 @@ PHPAPI void php_register_variable_ex(const char *var_name, zval *val, zval *trac
zval_ptr_dtor_nogc(val); zval_ptr_dtor_nogc(val);
/* do not output the error message to the screen, /* do not output the error message to the screen,
this helps us to to avoid "information disclosure" */ this helps us to avoid "information disclosure" */
if (!PG(display_errors)) { if (!PG(display_errors)) {
php_error_docref(NULL, E_WARNING, "Input variable nesting level exceeded " ZEND_LONG_FMT ". To increase the limit change max_input_nesting_level in php.ini.", PG(max_input_nesting_level)); php_error_docref(NULL, E_WARNING, "Input variable nesting level exceeded " ZEND_LONG_FMT ". To increase the limit change max_input_nesting_level in php.ini.", PG(max_input_nesting_level));
} }

View file

@ -421,7 +421,7 @@ typedef struct buf_area buffy;
* bep points to the end-of-buffer+1 * bep points to the end-of-buffer+1
* While using this macro, note that the nextb pointer is NOT updated. * While using this macro, note that the nextb pointer is NOT updated.
* *
* NOTE: Evaluation of the c argument should not have any side-effects * NOTE: Evaluation of the c argument should not have any side effects
*/ */
#define INS_CHAR(c, sp, bep, cc) \ #define INS_CHAR(c, sp, bep, cc) \
{ \ { \

View file

@ -539,7 +539,7 @@ static int php_stdiop_flush(php_stream *stream)
/* /*
* stdio buffers data in user land. By calling fflush(3), this * stdio buffers data in user land. By calling fflush(3), this
* data is send to the kernel using write(2). fsync'ing is * data is sent to the kernel using write(2). fsync'ing is
* something completely different. * something completely different.
*/ */
if (data->file) { if (data->file) {

View file

@ -469,7 +469,7 @@ fprintf(stderr, "stream_free: %s:%p[%s] preserve_handle=%d release_cast=%d remov
the cookie_closer unsets the fclose_stdiocast flags, so the cookie_closer unsets the fclose_stdiocast flags, so
we can be sure that we only reach here when PHP code calls we can be sure that we only reach here when PHP code calls
php_stream_free. php_stream_free.
Lets let the cookie code clean it all up. Let's let the cookie code clean it all up.
*/ */
stream->in_free = 0; stream->in_free = 0;
return fclose(stream->stdiocast); return fclose(stream->stdiocast);
@ -839,7 +839,7 @@ PHPAPI int _php_stream_stat(php_stream *stream, php_stream_statbuf *ssb)
} }
/* if the stream doesn't directly support stat-ing, return with failure. /* if the stream doesn't directly support stat-ing, return with failure.
* We could try and emulate this by casting to a FD and fstat-ing it, * We could try and emulate this by casting to an FD and fstat-ing it,
* but since the fd might not represent the actual underlying content * but since the fd might not represent the actual underlying content
* this would give bogus results. */ * this would give bogus results. */
if (stream->ops->stat == NULL) { if (stream->ops->stat == NULL) {
@ -1503,7 +1503,7 @@ PHPAPI zend_string *_php_stream_copy_to_mem(php_stream *src, size_t maxlen, int
return result; return result;
} }
/* avoid many reallocs by allocating a good sized chunk to begin with, if /* avoid many reallocs by allocating a good-sized chunk to begin with, if
* we can. Note that the stream may be filtered, in which case the stat * we can. Note that the stream may be filtered, in which case the stat
* result may be inaccurate, as the filter may inflate or deflate the * result may be inaccurate, as the filter may inflate or deflate the
* number of bytes that we can read. In order to avoid an upsize followed * number of bytes that we can read. In order to avoid an upsize followed

View file

@ -76,7 +76,7 @@ PHPAPI php_stream *_php_stream_xport_create(const char *name, size_t namelen, in
if (persistent_id) { if (persistent_id) {
switch(php_stream_from_persistent_id(persistent_id, &stream)) { switch(php_stream_from_persistent_id(persistent_id, &stream)) {
case PHP_STREAM_PERSISTENT_SUCCESS: case PHP_STREAM_PERSISTENT_SUCCESS:
/* use a 0 second timeout when checking if the socket /* use a 0-second timeout when checking if the socket
* has already died */ * has already died */
if (PHP_STREAM_OPTION_RETURN_OK == php_stream_set_option(stream, PHP_STREAM_OPTION_CHECK_LIVENESS, 0, NULL)) { if (PHP_STREAM_OPTION_RETURN_OK == php_stream_set_option(stream, PHP_STREAM_OPTION_CHECK_LIVENESS, 0, NULL)) {
return stream; return stream;