diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-07-16 16:40:54 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-07-16 16:44:37 +0200 |
commit | 49bac9b77bc9cacc0f984092d226e951ae336b43 (patch) | |
tree | f705f93aa693fc5e0ea5c44231585fd41f42dd57 /ext/phar/phar_object.c | |
parent | 46faf8f018e95de27873dbcf7c094af18c4c08e4 (diff) | |
download | php-git-49bac9b77bc9cacc0f984092d226e951ae336b43.tar.gz |
Introduce zend_stream_init_filename()
Avoid more ad-hoc initialization of zend_file_handle structures.
Diffstat (limited to 'ext/phar/phar_object.c')
-rw-r--r-- | ext/phar/phar_object.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index 783b7f77f8..3478507499 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -219,10 +219,7 @@ static int phar_file_action(phar_archive_data *phar, phar_entry_info *info, char name_len = spprintf(&name, 4096, "phar://%s/%s", arch, entry); } - file_handle.type = ZEND_HANDLE_FILENAME; - file_handle.filename = name; - file_handle.opened_path = NULL; - file_handle.free_filename = 0; + zend_stream_init_filename(&file_handle, name); PHAR_G(cwd) = NULL; PHAR_G(cwd_len) = 0; |