diff options
author | Dmitry Stogov <dmitry@zend.com> | 2021-03-16 20:31:36 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2021-03-16 20:31:36 +0300 |
commit | c732ab400af92c54eee47c487a56009f1d79dd5d (patch) | |
tree | 083d31748450932114a7667aae9235cde030efcb /sapi/phpdbg/phpdbg_prompt.c | |
parent | 9bbeb0555b6b842ebd44e08510ff3f3226237544 (diff) | |
download | php-git-c732ab400af92c54eee47c487a56009f1d79dd5d.tar.gz |
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.
Diffstat (limited to 'sapi/phpdbg/phpdbg_prompt.c')
-rw-r--r-- | sapi/phpdbg/phpdbg_prompt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c index 13026978bf..acdae17ce3 100644 --- a/sapi/phpdbg/phpdbg_prompt.c +++ b/sapi/phpdbg/phpdbg_prompt.c @@ -566,7 +566,8 @@ int phpdbg_compile(void) /* {{{ */ return FAILURE; } - if (php_stream_open_for_zend_ex(PHPDBG_G(exec), &fh, USE_PATH|STREAM_OPEN_FOR_INCLUDE) == SUCCESS && zend_stream_fixup(&fh, &buf, &len) == SUCCESS) { + zend_stream_init_filename(&fh, PHPDBG_G(exec)); + if (php_stream_open_for_zend_ex(&fh, USE_PATH|STREAM_OPEN_FOR_INCLUDE) == SUCCESS && zend_stream_fixup(&fh, &buf, &len) == SUCCESS) { CG(skip_shebang) = 1; PHPDBG_G(ops) = zend_compile_file(&fh, ZEND_INCLUDE); zend_destroy_file_handle(&fh); @@ -581,7 +582,7 @@ int phpdbg_compile(void) /* {{{ */ } else { phpdbg_error("compile", "type=\"openfailure\" context=\"%s\"", "Could not open file %s", PHPDBG_G(exec)); } - + zend_destroy_file_handle(&fh); return FAILURE; } /* }}} */ |