Revert "Revert "Remove name field from the zend_constant struct (#10954)""

This reverts commit 9f4bd3040d.
This commit is contained in:
Ilija Tovilo 2023-07-04 10:26:28 +02:00
parent 149fb8fc34
commit ad1b70d67e
No known key found for this signature in database
GPG key ID: A4F5D403F118200A
15 changed files with 68 additions and 81 deletions

View file

@ -558,16 +558,13 @@ static void cli_register_file_handles(void)
php_stream_to_zval(s_err, &ec.value);
Z_CONSTANT_FLAGS(ic.value) = 0;
ic.name = zend_string_init_interned("STDIN", sizeof("STDIN")-1, 0);
zend_register_constant(&ic);
zend_register_internal_constant("STDIN", sizeof("STDIN")-1, &ic);
Z_CONSTANT_FLAGS(oc.value) = 0;
oc.name = zend_string_init_interned("STDOUT", sizeof("STDOUT")-1, 0);
zend_register_constant(&oc);
zend_register_internal_constant("STDOUT", sizeof("STDOUT")-1, &oc);
Z_CONSTANT_FLAGS(ec.value) = 0;
ec.name = zend_string_init_interned("STDERR", sizeof("STDERR")-1, 0);
zend_register_constant(&ec);
zend_register_internal_constant("STDERR", sizeof("STDERR")-1, &ec);
}
static const char *param_mode_conflict = "Either execute direct code, process stdin or use a file.\n";