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

This reverts commit f42992f580.

Closes GH-11604
This commit is contained in:
Ilija Tovilo 2023-07-06 09:55:11 +02:00
parent de60872cfd
commit 1a0ef2c1cc
No known key found for this signature in database
GPG key ID: A4F5D403F118200A
16 changed files with 84 additions and 71 deletions

View file

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