Remove unnecessary usage of CONST_CS

Closes GH-9685.
This commit is contained in:
Jorg Adam Sowa 2022-11-28 17:12:07 +01:00 committed by GitHub
parent 289822d3ad
commit 77ee92a50c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 58 additions and 60 deletions

View file

@ -536,7 +536,7 @@ static void cli_register_file_handles(void)
s_out = php_stream_open_wrapper_ex("php://stdout", "wb", 0, NULL, sc_out);
s_err = php_stream_open_wrapper_ex("php://stderr", "wb", 0, NULL, sc_err);
/* Release stream resources, but don't free the underlying handles. Othewrise,
/* Release stream resources, but don't free the underlying handles. Otherwise,
* extensions which write to stderr or company during mshutdown/gshutdown
* won't have the expected functionality.
*/
@ -557,15 +557,15 @@ static void cli_register_file_handles(void)
php_stream_to_zval(s_out, &oc.value);
php_stream_to_zval(s_err, &ec.value);
ZEND_CONSTANT_SET_FLAGS(&ic, CONST_CS, 0);
Z_CONSTANT_FLAGS(ic.value) = 0;
ic.name = zend_string_init_interned("STDIN", sizeof("STDIN")-1, 0);
zend_register_constant(&ic);
ZEND_CONSTANT_SET_FLAGS(&oc, CONST_CS, 0);
Z_CONSTANT_FLAGS(oc.value) = 0;
oc.name = zend_string_init_interned("STDOUT", sizeof("STDOUT")-1, 0);
zend_register_constant(&oc);
ZEND_CONSTANT_SET_FLAGS(&ec, CONST_CS, 0);
Z_CONSTANT_FLAGS(ec.value) = 0;
ec.name = zend_string_init_interned("STDERR", sizeof("STDERR")-1, 0);
zend_register_constant(&ec);
}
@ -938,7 +938,7 @@ do_repeat:
zend_register_bool_constant(
ZEND_STRL("PHP_CLI_PROCESS_TITLE"),
is_ps_title_available() == PS_TITLE_SUCCESS,
CONST_CS, 0);
0, 0);
*arg_excp = arg_free; /* reconstruct argv */