Change Zend Stream API to use zend_string* instead of char*.

This allows to eliminate re-calculation of string lenght and hash value.
See the detailed list of changes in UPGRADING.INTERNALS.
This commit is contained in:
Dmitry Stogov 2021-03-16 20:31:36 +03:00
parent 9bbeb0555b
commit c732ab400a
45 changed files with 441 additions and 404 deletions

View file

@ -699,12 +699,14 @@ zend_first_try {
} else {
zend_file_handle zfd;
zend_stream_init_filename(&zfd, (char *) r->filename);
zfd.primary_script = 1;
if (!parent_req) {
php_execute_script(&zfd);
} else {
zend_execute_scripts(ZEND_INCLUDE, NULL, 1, &zfd);
}
zend_destroy_file_handle(&zfd);
apr_table_set(r->notes, "mod_php_memory_usage",
apr_psprintf(ctx->r->pool, "%" APR_SIZE_T_FMT, zend_memory_peak_usage(1)));